2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Fix a typo that prevented swapids() from restoring the original gid.

This led to a regression when the iolog_file setting ends in six or
more X's or when the I/O logs are stored on NFS.
This commit is contained in:
Todd C. Miller 2020-06-16 05:44:57 -06:00
parent 8bb5aedacf
commit bc6e36e940
2 changed files with 5 additions and 1 deletions

4
NEWS
View File

@ -66,6 +66,10 @@ What's new in Sudo 1.9.1
* Fixed a regression introduced in sudo 1.9.0 where sudoedit did
not remove its temporary files after installing them. Bug #929.
* Fixed a regression introduced in sudo 1.9.0 where the iolog_file
setting in sudoers and sudo_logsrvd.conf caused an error if the
file name ended in six or more X's.
What's new in Sudo 1.9.0
* Fixed a test failure in the strsig_test regress test on FreeBSD.

View File

@ -74,7 +74,7 @@ io_swapids(bool restore)
if (user_euid == (uid_t)-1)
user_euid = geteuid();
if (user_egid == (gid_t)-1)
user_euid = getegid();
user_egid = getegid();
if (restore) {
if (seteuid(user_euid) == -1) {