X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fexec.c;h=5434c9d528cc9f3f477c12323785d3cbe943ed7a;hb=d3ec2a4ce4b4743ecf56c2ed7b32d74fd58210dc;hp=5057a300ac209272bca57a33a6fab5e3e7a233b2;hpb=5cd4d056da050eb96d88540ecfd51245a4e1cdf7;p=linux-2.6.git diff --git a/fs/exec.c b/fs/exec.c index 5057a300a..5434c9d52 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -962,7 +962,13 @@ EXPORT_SYMBOL(prepare_binprm); static int unsafe_exec(struct task_struct *p) { - int unsafe = tracehook_unsafe_exec(p); + int unsafe = 0; + if (p->ptrace & PT_PTRACED) { + if (p->ptrace & PT_PTRACE_CAP) + unsafe |= LSM_UNSAFE_PTRACE_CAP; + else + unsafe |= LSM_UNSAFE_PTRACE; + } if (atomic_read(&p->fs->count) > 1 || atomic_read(&p->files->count) > 1 || atomic_read(&p->sighand->count) > 1) @@ -1087,7 +1093,6 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) bprm->file = NULL; current->did_exec = 1; proc_exec_connector(current); - tracehook_report_exec(bprm, regs); return retval; } read_lock(&binfmt_lock);