diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2014-07-27 12:48:43 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2014-07-27 12:48:43 -0500 |
commit | b676ed7f78d40ba7d94f7a8093f836747fd3adb5 (patch) | |
tree | 8ce2cc1b721d144af5707c6e003e5b839c0653e3 /core/bash/privmode-setuid-fail.patch | |
parent | 460c03c4195c86b0935e894c4b3d3cdba0775ecb (diff) |
Updating bash and readline
Diffstat (limited to 'core/bash/privmode-setuid-fail.patch')
-rw-r--r-- | core/bash/privmode-setuid-fail.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/core/bash/privmode-setuid-fail.patch b/core/bash/privmode-setuid-fail.patch new file mode 100644 index 000000000..059857d0b --- /dev/null +++ b/core/bash/privmode-setuid-fail.patch @@ -0,0 +1,29 @@ +*** ../bash-4.3-patched/shell.c 2014-01-14 08:04:32.000000000 -0500 +--- shell.c 2014-06-06 16:29:01.000000000 -0400 +*************** +*** 1227,1232 **** + disable_priv_mode () + { +! setuid (current_user.uid); +! setgid (current_user.gid); + current_user.euid = current_user.uid; + current_user.egid = current_user.gid; +--- 1229,1246 ---- + disable_priv_mode () + { +! int e; +! +! if (setuid (current_user.uid) < 0) +! { +! e = errno; +! sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid); +! #if defined (EXIT_ON_SETUID_FAILURE) +! if (e == EAGAIN) +! exit (e); +! #endif +! } +! if (setgid (current_user.gid) < 0) +! sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid); +! + current_user.euid = current_user.uid; + current_user.egid = current_user.gid; |