[sudo-users] Debugging a sudo segmentation fault

Todd C. Miller Todd.Miller at courtesan.com
Fri Oct 30 18:32:00 EDT 2009

In message <200910302218.n9UMIid7011752 at darwin.sdsc.edu>
	so spake Jeff Makey (jeff):

> My question is: how can I use gdb to debug this?  I can run gdb as
> root, but when sudo runs as root (even with SUDO_USER=jeff in the
> environment) it does not ask for a password.  Is there an easy way to
> hack sudo to make it ask for the user password when run as root?

In the check_user() function in check.c comment out the following:

    if (user_uid == 0 || user_uid == runas_pw->pw_uid || user_is_exempt())  

then sudo will prompt for the password even if you are root.  It
is probably sufficient to just remove the "user_uid == 0" bit if
you prefer.

 - todd

More information about the sudo-users mailing list