commit bash-20190628 snapshot

This commit is contained in:
Chet Ramey
2019-07-01 09:03:53 -04:00
parent 602eae4d6b
commit 951bdaad7a
15 changed files with 158 additions and 58 deletions
+8
View File
@@ -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;