]> granicus.if.org Git - sudo/commitdiff
runas_pw can no longer be NULL here
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 15:40:41 +0000 (09:40 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 15:40:41 +0000 (09:40 -0600)
plugins/sudoers/match.c

index 982a3ff96305e4ca05d3f33e44e3eb12b03fbc19..8bc06c3ed226db49d6e6b549f49b070c3fad719d 100644 (file)
@@ -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) {