Commit 3edc808a authored by Dann Frazier's avatar Dann Frazier

adjust patch to apply

svn path=/dists/etch/linux-2.6/; revision=9465
parent 59e24eb8
......@@ -16,10 +16,12 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
Backported to Debian's 2.6.18 by dann frazier <dannf@debian.org>
diff -urpN linux-source-2.6.18.orig/fs/exec.c linux-source-2.6.18/fs/exec.c
--- linux-source-2.6.18.orig/fs/exec.c 2007-08-11 08:55:05.000000000 -0600
+++ linux-source-2.6.18/fs/exec.c 2007-08-29 00:26:45.380758719 -0600
@@ -883,11 +883,13 @@ int flush_old_exec(struct linux_binprm *
--- linux-source-2.6.18.orig/fs/exec.c 2007-09-05 14:11:16.000000000 -0600
+++ linux-source-2.6.18/fs/exec.c 2007-09-05 14:17:02.000000000 -0600
@@ -883,9 +883,12 @@ int flush_old_exec(struct linux_binprm *
*/
current->mm->task_size = TASK_SIZE;
......@@ -27,12 +29,23 @@ diff -urpN linux-source-2.6.18.orig/fs/exec.c linux-source-2.6.18/fs/exec.c
- 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;
+ suid_keys(current);
+ current->mm->dumpable = suid_dumpable;
+ current->pdeath_signal = 0;
+ } else if (file_permission(bprm->file, MAY_READ) ||
+ (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) {
+ suid_keys(current);
suid_keys(current);
current->mm->dumpable = suid_dumpable;
}
@@ -977,8 +980,10 @@ void compute_creds(struct linux_binprm *
{
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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment