the runas user's group in the passwd database and that group is not
denied in the Runas_Spec, allow it. Thus, if user root's gid in
/etc/passwd is 0, then "sudo -u root -g root id" is allow even if
no groups are present in the Runas_Spec.
--HG--
branch : 1.7
if (group_matched != UNSPEC)
break;
}
+ if (group_matched == UNSPEC) {
+ if (runas_pw != NULL && runas_pw->pw_gid == runas_gr->gr_gid)
+ group_matched = ALLOW; /* runas group matches passwd db */
+ }
}
if (user_matched == DENY || group_matched == DENY)