Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64030
b: refs/heads/master
c: d2d56c5
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann authored and Linus Torvalds committed Aug 18, 2007
1 parent 0e5e736 commit c351a95
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28e8351ac22de25034e048c680014ad824323c65
refs/heads/master: d2d56c5f51028cb9f3d800882eb6f4cbd3f9099f
13 changes: 9 additions & 4 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,9 +1084,12 @@ int flush_old_exec(struct linux_binprm * bprm)
*/
current->mm->task_size = TASK_SIZE;

if (bprm->e_uid != current->euid || bprm->e_gid != current->egid ||
file_permission(bprm->file, MAY_READ) ||
(bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
if (bprm->e_uid != current->euid || bprm->e_gid != current->egid) {
suid_keys(current);
set_dumpable(current->mm, suid_dumpable);
current->pdeath_signal = 0;
} else if (file_permission(bprm->file, MAY_READ) ||
(bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
suid_keys(current);
set_dumpable(current->mm, suid_dumpable);
}
Expand Down Expand Up @@ -1177,8 +1180,10 @@ void compute_creds(struct linux_binprm *bprm)
{
int unsafe;

if (bprm->e_uid != current->uid)
if (bprm->e_uid != current->uid) {
suid_keys(current);
current->pdeath_signal = 0;
}
exec_keys(current);

task_lock(current);
Expand Down

0 comments on commit c351a95

Please sign in to comment.