Bug 63 - always_set_home conflict with sudo -l
always_set_home conflict with sudo -l
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.4
Sun Other
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-15 13:30 MST by rudeyak
Modified: 2002-01-15 17:44 MST (History)
0 users

See Also:


Attachments
The following patch will be in the next official sudo patch release. (795 bytes, patch)
2002-01-15 13:39 MST, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rudeyak 2002-01-15 13:30:37 MST
if always_set_home is set, I can't run sudo -l; I get the following:

sudo: unable to exec list: No such file or directory

it seems that the

        else if (sudo_mode == MODE_LIST) {
            list_matches();
            exit(0);
        }


is not being called and we drop down to

        /*
         * If we got here then the exec() failed...
         */
        (void) fprintf(stderr, "%s: unable to exec %s: %s\n",
            Argv[0], safe_cmnd, strerror(errno));

Could it be because

    /* May need to set $HOME to target user. */
    if (def_flag(I_ALWAYS_SET_HOME) ||
        ((sudo_mode & MODE_SHELL) && def_flag(I_SET_HOME)))
        sudo_mode |= MODE_RESET_HOME;

changes sudo_mode and then the comparison fails?  Perhaps it should be

/*      else if (sudo_mode == MODE_LIST) { */
        else if (sudo_mode & MODE_LIST) {

I am running on Solaris 2.6 with gcc 2.95.2
Comment 1 Todd C. Miller 2002-01-15 13:39:59 MST
Created attachment 9 [details]
The following patch will be in the next official sudo patch release.
Comment 2 Todd C. Miller 2002-01-15 13:44:59 MST
Will be fixed in sudo 1.6.2p2