Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132610
b: refs/heads/master
c: f9ce1f1
h: refs/heads/master
v: v3
  • Loading branch information
Kentaro Takeda authored and James Morris committed Feb 12, 2009
1 parent 6de2843 commit 808f0e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 523979adfa0b79d4e3aa053220c37a9233294206
refs/heads/master: f9ce1f1cda8b73a36f47e424975a9dfa78b7840c
3 changes: 3 additions & 0 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ int compat_do_execve(char * filename,
retval = mutex_lock_interruptible(&current->cred_exec_mutex);
if (retval < 0)
goto out_free;
current->in_execve = 1;

retval = -ENOMEM;
bprm->cred = prepare_exec_creds();
Expand Down Expand Up @@ -1454,6 +1455,7 @@ int compat_do_execve(char * filename,
goto out;

/* execve succeeded */
current->in_execve = 0;
mutex_unlock(&current->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
Expand All @@ -1470,6 +1472,7 @@ int compat_do_execve(char * filename,
}

out_unlock:
current->in_execve = 0;
mutex_unlock(&current->cred_exec_mutex);

out_free:
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,7 @@ int do_execve(char * filename,
retval = mutex_lock_interruptible(&current->cred_exec_mutex);
if (retval < 0)
goto out_free;
current->in_execve = 1;

retval = -ENOMEM;
bprm->cred = prepare_exec_creds();
Expand Down Expand Up @@ -1331,6 +1332,7 @@ int do_execve(char * filename,
goto out;

/* execve succeeded */
current->in_execve = 0;
mutex_unlock(&current->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
Expand All @@ -1349,6 +1351,7 @@ int do_execve(char * filename,
}

out_unlock:
current->in_execve = 0;
mutex_unlock(&current->cred_exec_mutex);

out_free:
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,8 @@ struct task_struct {
/* ??? */
unsigned int personality;
unsigned did_exec:1;
unsigned in_execve:1; /* Tell the LSMs that the process is doing an
* execve */
pid_t pid;
pid_t tgid;

Expand Down

0 comments on commit 808f0e9

Please sign in to comment.