Bugzilla – Bug 654
sudoedit doesn't work at all in AIX since at least sudo.1.8.9.4
Last modified: 2014-09-24 09:32:32 MDT
sudoedit stopped working in AIX. It doesn't matter AIX version (tried in 5.2, 5.3, 6.1, 7). Last tried sudo version which works is 1.8.8.0. First tried version which doesn't work is 1.8.9.4. This is what sudoedit answers in a recent version: root@HOST:/> sudoedit usage: sudo -h | -K | -k | -V usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user] usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command] usage: sudo [-AbEHknPS] [-C num] [-g group] [-h host] [-p prompt] [-u user] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-C num] [-g group] [-h host] [-p prompt] [-u user] file ... This is what says in a working machine root@HOST:/> sudoedit usage: sudoedit [-AknS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ... If you try to edit a file: root@HOST:/> sudoedit /etc/motd sudo: /etc/motd: command not found root@HOST:/> Editor is never opened. sudo -e seems to work, but sometimes it gives you an error when exiting: "/var/tmp/motd.ocSWRGw3" 37 lines, 1689 characters sudo: unable to execute /bin/vi: Interrupted system call This makes new sudo versions useless in our installation. We forbid users to use vi and the alternative is sudoedit.
Confirmed on AIX 5.3, it looks like the it is not properly matching on the program name, However, I also see a hang with "sudo -e filename" which will also need to be fixed.
Created attachment 415 [details] Avoid using /proc on AIX to determine program name The problem is that on AIX when you get the executable name via /proc and you executed a symbolic link, it gives you the link target and not the name of the link itself.
The hang I was seeing is only when debugging is enabled via sudo.conf so it should affect you. The attached patch should be sufficiet. As a workaround you can just use "sudo -e" instead of sudoedit.
This will be fixed in sudo 1.8.11. For the time being, if you replace the sudoedit symbolic link with a hard link it will work as expected.
*** Bug 659 has been marked as a duplicate of this bug. ***
Fixed in sudo 1.8.11.