mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-14 15:40:51 +02:00
commit bash-20190628 snapshot
This commit is contained in:
@@ -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