if (retval)
return retval;
- retval = audit_bprm(bprm);
- if (retval)
- return retval;
-
/* Need to fetch pid before load_binary changes it */
old_pid = current->pid;
rcu_read_lock();
bprm->recursion_depth = depth;
if (retval >= 0) {
if (depth == 0) {
+ audit_bprm(bprm);
trace_sched_process_exec(current, old_pid, bprm);
ptrace_event(PTRACE_EVENT_EXEC, old_vpid);
}
if (unlikely(!audit_dummy_context()))
__audit_ipc_set_perm(qbytes, uid, gid, mode);
}
-static inline int audit_bprm(struct linux_binprm *bprm)
+static inline void audit_bprm(struct linux_binprm *bprm)
{
if (unlikely(!audit_dummy_context()))
__audit_bprm(bprm);
- return 0;
}
static inline int audit_socketcall(int nargs, unsigned long *args)
{
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
gid_t gid, umode_t mode)
{ }
-static inline int audit_bprm(struct linux_binprm *bprm)
-{
- return 0;
-}
+static inline void audit_bprm(struct linux_binprm *bprm)
+{ }
static inline int audit_socketcall(int nargs, unsigned long *args)
{
return 0;
} mmap;
struct {
int argc;
- struct mm_struct *mm;
} execve;
};
int fds[2];
const char __user *p;
char *buf;
- if (context->execve.mm != current->mm)
- return; /* execve failed, no additional info */
-
p = (const char __user *)current->mm->arg_start;
audit_log_format(*ab, "argc=%d", context->execve.argc);
context->type = AUDIT_EXECVE;
context->execve.argc = bprm->argc;
- context->execve.mm = bprm->mm;
}