2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Repair "sudo -l -U username"

This commit is contained in:
Todd C. Miller
2010-05-25 14:21:21 -04:00
parent 937b5f166d
commit 45923111e0

View File

@@ -673,8 +673,10 @@ sudoers_policy_list(int argc, char * const argv[], int verbose,
long_list = 1;
if (list_user) {
list_pw = sudo_getpwnam(list_user);
warningx("unknown user: %s", optarg);
return -1;
if (list_pw == NULL) {
warningx("unknown user: %s", list_user);
return -1;
}
}
return sudoers_policy_main(argc, argv, I_LISTPW, NULL, NULL, NULL, NULL);