mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-17 04:30:01 +01:00
commit bash-20190628 snapshot
This commit is contained in:
1 parent
602eae4d6b
commit
951bdaad7a
15 files changed
+158
-58
No files matched your search
@@ -1293,7 +1293,11 @@ disable_priv_mode ()
|
||||
{
|
||||
int e;
|
||||
|
||||
#if HAVE_DECL_SETRESUID
|
||||
if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0)
|
||||
#else
|
||||
if (setuid (current_user.uid) < 0)
|
||||
#endif
|
||||
{
|
||||
e = errno;
|
||||
sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid);
|
||||
@@ -1302,7 +1306,11 @@ disable_priv_mode ()
|
||||
exit (e);
|
||||
#endif
|
||||
}
|
||||
#if HAVE_DECL_SETRESGID
|
||||
if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0)
|
||||
#else
|
||||
if (setgid (current_user.gid) < 0)
|
||||
#endif
|
||||
sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid);
|
||||
|
||||
current_user.euid = current_user.uid;
|
||||
|
||||
Reference in new issue
Block a user