Skip to content

Commit ef7cc6e

Browse files
committed
sudoers_policy_list: do not set runas_pw to list_pw when listing
This change introduced in sudo 1.9.13 is not actually needed. The "list" pseudo-command checks are performed via runas_matches_pw() which does not use runas_pw. GitHub issue #248 --HG-- branch : 1.9
1 parent 2d0e319 commit ef7cc6e

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

plugins/sudoers/policy.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,11 +1270,6 @@ sudoers_policy_list(int argc, char * const argv[], int verbose,
12701270
sudo_warnx(U_("unknown user %s"), list_user);
12711271
debug_return_int(-1);
12721272
}
1273-
/* A user may only list another user they have runas access to. */
1274-
if (runas_pw != NULL)
1275-
sudo_pw_delref(runas_pw);
1276-
runas_pw = list_pw;
1277-
sudo_pw_addref(list_pw);
12781273
}
12791274
ret = sudoers_policy_main(argc, argv, I_LISTPW, NULL, verbose, NULL);
12801275
if (list_user) {

0 commit comments

Comments
 (0)