diff options
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index 65a070e705a..0949b43794a 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1402,12 +1402,13 @@ int compat_do_execve(char * filename, retval = mutex_lock_interruptible(¤t->cred_exec_mutex); if (retval < 0) goto out_free; + current->in_execve = 1; retval = -ENOMEM; bprm->cred = prepare_exec_creds(); if (!bprm->cred) goto out_unlock; - check_unsafe_exec(bprm); + check_unsafe_exec(bprm, current->files); file = open_exec(filename); retval = PTR_ERR(file); @@ -1454,6 +1455,7 @@ int compat_do_execve(char * filename, goto out; /* execve succeeded */ + current->in_execve = 0; mutex_unlock(¤t->cred_exec_mutex); acct_update_integrals(current); free_bprm(bprm); @@ -1470,6 +1472,7 @@ out_file: } out_unlock: + current->in_execve = 0; mutex_unlock(¤t->cred_exec_mutex); out_free: |