Rename sudo_strtoid() to sudo_strtoidx() and add simplified sudo_strtoid()
This commit is contained in:
@@ -453,7 +453,7 @@ userpw_matches(const char *sudoers_user, const char *user, const struct passwd *
|
||||
debug_decl(userpw_matches, SUDOERS_DEBUG_MATCH)
|
||||
|
||||
if (pw != NULL && *sudoers_user == '#') {
|
||||
uid = (uid_t) sudo_strtoid(sudoers_user + 1, NULL, NULL, &errstr);
|
||||
uid = (uid_t) sudo_strtoid(sudoers_user + 1, &errstr);
|
||||
if (errstr == NULL && uid == pw->pw_uid) {
|
||||
rc = true;
|
||||
goto done;
|
||||
@@ -483,7 +483,7 @@ group_matches(const char *sudoers_group, const struct group *gr)
|
||||
debug_decl(group_matches, SUDOERS_DEBUG_MATCH)
|
||||
|
||||
if (*sudoers_group == '#') {
|
||||
gid = (gid_t) sudo_strtoid(sudoers_group + 1, NULL, NULL, &errstr);
|
||||
gid = (gid_t) sudo_strtoid(sudoers_group + 1, &errstr);
|
||||
if (errstr == NULL && gid == gr->gr_gid) {
|
||||
rc = true;
|
||||
goto done;
|
||||
|
Reference in New Issue
Block a user