diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index 982a3ff96..8bc06c3ed 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -216,7 +216,7 @@ runaslist_matches(const struct member_list *user_list, */ if (runas_gr != NULL) { if (user_matched == UNSPEC) { - if (runas_pw == NULL || strcmp(runas_pw->pw_name, user_name) == 0) + if (strcmp(runas_pw->pw_name, user_name) == 0) user_matched = ALLOW; /* only changing group */ } if (group_list != NULL) {