Bugzilla – Bug 63
always_set_home conflict with sudo -l
Last modified: 2002-01-15 17:44:28 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
Created attachment 9 [details] The following patch will be in the next official sudo patch release.
Will be fixed in sudo 1.6.2p2