Bug 865

Summary: Default log_output breaks who am i command output
Product: Sudo Reporter: Martin Hulka <martin.hulka>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.8.26   
Hardware: IBM   
OS: AIX   

Description Martin Hulka 2019-01-02 05:21:34 MST
Not exactly sure when it got broken but here is the version where it still works as expected compared to the latest one:

$ sudo -V
Sudo version 1.8.3p2
Sudoers policy plugin version 1.8.3p2
Sudoers file grammar version 40
Sudoers I/O plugin version 1.8.3p2
$ sudo su -
[root@xxxxx:/home/root:] who am i
mhulka      pts/2       Jan  2 12:25     (xxx.xxx.xxx.xxx) 
[root@xxxxx:/home/root:] 


$ sudo -V
Sudo version 1.8.26
Sudoers policy plugin version 1.8.26
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.26
$ sudo su -
Password: 
[root@xxxxx:/home/root:] who am i
root      pts/2 
[root@xxxxx:/home/root:]


respective configuration part from /etc/sudoers:
Defaults log_output
Defaults!/usr/bin/sudoreplay !log_output
Defaults!/etc/reboot !log_output
Defaults!/usr/sbin/reboot !log_output
Defaults!/etc/shutdown !log_output
Defaults!/usr/sbin/shutdown !log_output


if I remove this part from /etc/sudoers everything works as expected however we do not have data for sudoreplay which we would like to have.
Comment 1 Martin Hulka 2019-01-02 05:30:47 MST
checked other versions and it still works in 
1.8.18p1
however is already broken in 
1.8.22
do not have other versions at the moment to test.
Comment 2 Todd C. Miller 2019-01-02 07:02:23 MST
Thanks for narrowing that down, I'll take a look at what has broken the utmp file handling.
Comment 3 Todd C. Miller 2019-01-02 07:40:19 MST
This is fixed by the following commit:
https://www.sudo.ws/repos/sudo/rev/cf81f3fa1f3a
Comment 4 Todd C. Miller 2019-01-12 10:03:35 MST
Fixed in sudo 1.8.27, out now.