|
|
|
@ -1840,11 +1840,13 @@ static int exec_binprm(struct linux_binprm *bprm) |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_KSU |
|
|
|
|
extern bool ksu_execveat_hook __read_mostly; |
|
|
|
|
extern int ksu_handle_execveat(int *fd, struct filename **filename_ptr, void *argv, |
|
|
|
|
void *envp, int *flags); |
|
|
|
|
extern int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr, |
|
|
|
|
void *argv, void *envp, int *flags); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* sys_execve() executes a new program. |
|
|
|
@ -1860,10 +1862,12 @@ static int do_execveat_common(int fd, struct filename *filename, |
|
|
|
|
struct files_struct *displaced; |
|
|
|
|
int retval; |
|
|
|
|
|
|
|
|
|
if (unlikely(ksu_execveat_hook)) |
|
|
|
|
#ifdef CONFIG_KSU |
|
|
|
|
if (unlikely(ksu_execveat_hook)) |
|
|
|
|
ksu_handle_execveat(&fd, &filename, &argv, &envp, &flags); |
|
|
|
|
else |
|
|
|
|
ksu_handle_execveat_sucompat(&fd, &filename, &argv, &envp, &flags); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (IS_ERR(filename)) |
|
|
|
|
return PTR_ERR(filename); |
|
|
|
|