Fix matching of uids and gids broken in sudo 1.8.9.
This commit is contained in:
@@ -802,7 +802,7 @@ userpw_matches(const char *sudoers_user, const char *user, const struct passwd *
|
||||
|
||||
if (pw != NULL && *sudoers_user == '#') {
|
||||
uid = (uid_t) atoid(sudoers_user + 1, NULL, NULL, &errstr);
|
||||
if (errstr != NULL && uid == pw->pw_uid) {
|
||||
if (errstr == NULL && uid == pw->pw_uid) {
|
||||
rc = true;
|
||||
goto done;
|
||||
}
|
||||
@@ -829,7 +829,7 @@ group_matches(const char *sudoers_group, const struct group *gr)
|
||||
|
||||
if (*sudoers_group == '#') {
|
||||
gid = (gid_t) atoid(sudoers_group + 1, NULL, NULL, &errstr);
|
||||
if (errstr != NULL && gid == gr->gr_gid) {
|
||||
if (errstr == NULL && gid == gr->gr_gid) {
|
||||
rc = true;
|
||||
goto done;
|
||||
}
|
||||
|
Reference in New Issue
Block a user