[sudo-users] sudoedit in sudo-1.8.7b1 and later doesn't copy the file back post-edit
James
ferret-sudoml at explodingferret.com
Fri Jan 3 15:19:47 MST 2014
Hi sudoers,
I have a problem. When I use sudoedit or sudo -e the tmp file isn't
copied back at the end, so the file doesn't change. Other sudo commands
(e.g. sudo ls /root) work as expected. I have tried the most recent
version (1.8.9rc1), different editors, etc. sudoers file is a default
one with the %wheel ALL line uncommented. No odd configure options or
plugins (I have downloaded source directly and configured it with only
the --with-pluginsdir changed to make sure it uses the right one).
ps output is interesting. In version 1.8.6p8 (last version where it
works):
21305 pts/2 Ss 0:00 \_ bash
21315 pts/2 S+ 0:00 | \_ ./src/sudo -e ../foo
21317 pts/2 S+ 0:00 | \_ vim /var/tmp/foo.XXpDzSxh
In version 1.8.7b1 (first version where it doesn't work)
21305 pts/2 Ss 0:00 \_ bash
21354 pts/2 S+ 0:00 | \_ vim /var/tmp/foo.XXXTa5qP
There are too many changes between these two for me to work it out from
looking at the source, but this ChangeLog entry looks like it's related:
2013-02-23 Todd C. Miller <Todd.Miller at courtesan.com>
[...]
* src/exec.c, src/exec_common.c, src/exec_pty.c, src/sudo_exec.h,
src/sudo_plugin_int.h:
If the policy plugin does not provide a close function, there is no
command timeout and no pty is required, skip the event loop and just
exec the command directly.
[ad532f107170]
Let me know if more info needed - system is a fairly standard gentoo
linux box; only thing I can think of that I have that's unusual is I
don't have pam installed, at all.
Cheers,
James
More information about the sudo-users
mailing list