mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
execute elf add executable permissions check. (#7769)
This commit is contained in:
@@ -2246,6 +2246,11 @@ sysret_t sys_execve(const char *path, char *const argv[], char *const envp[])
|
||||
int i;
|
||||
struct lwp_args_info args_info;
|
||||
|
||||
if (access(path, X_OK) != 0)
|
||||
{
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
lwp = lwp_self();
|
||||
thread = rt_thread_self();
|
||||
uni_thread = 1;
|
||||
|
||||
Reference in New Issue
Block a user