Bugzilla – Bug 1030
environment problem when log_subcmds is enabled
Last modified: 2022-06-06 13:10:03 MDT
On AIX, if log_subcmds is enabled, becoming another user does not get proper environment. For example, the following sequence: sudo -i su - otheruser vi testfile This will throw an error - "History file has no read permission" Output from truss shows vi attempting to read //.vi_history instead of .vi_history from the user. This can also be seen via output from the "env" command. Root's path is still in place instead of otherusers. Behavior works as expected if log_subcmds is not enabled.
I can't reproduce that behavior on other platforms, I will try on AIX soon.
I was able to reproduce the issue on AIX. It is fixed by the following commit, which will be part of sudo 1.9.11. https://www.sudo.ws/repos/sudo/rev/dc0187c68c1b
Fixed in sudo 1.9.11, which is available now.