From bc6e36e940d40f4c701f7b90bfd259017e7904e6 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 16 Jun 2020 05:44:57 -0600 Subject: [PATCH] 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. --- NEWS | 4 ++++ lib/iolog/iolog_fileio.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 05e745390..711ee207c 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/lib/iolog/iolog_fileio.c b/lib/iolog/iolog_fileio.c index 21e35be31..533646b5b 100644 --- a/lib/iolog/iolog_fileio.c +++ b/lib/iolog/iolog_fileio.c @@ -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) {