mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Rename sudo_strtoid() to sudo_strtoidx() and add simplified sudo_strtoid()
This commit is contained in:
@@ -129,7 +129,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
}
|
||||
if (MATCHES(*cur, "sudoers_uid=")) {
|
||||
p = *cur + sizeof("sudoers_uid=") - 1;
|
||||
sudoers_uid = (uid_t) sudo_strtoid(p, NULL, NULL, &errstr);
|
||||
sudoers_uid = (uid_t) sudo_strtoid(p, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
|
||||
goto bad;
|
||||
@@ -138,7 +138,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
}
|
||||
if (MATCHES(*cur, "sudoers_gid=")) {
|
||||
p = *cur + sizeof("sudoers_gid=") - 1;
|
||||
sudoers_gid = (gid_t) sudo_strtoid(p, NULL, NULL, &errstr);
|
||||
sudoers_gid = (gid_t) sudo_strtoid(p, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
|
||||
goto bad;
|
||||
@@ -343,7 +343,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
}
|
||||
if (MATCHES(*cur, "uid=")) {
|
||||
p = *cur + sizeof("uid=") - 1;
|
||||
user_uid = (uid_t) sudo_strtoid(p, NULL, NULL, &errstr);
|
||||
user_uid = (uid_t) sudo_strtoid(p, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
|
||||
goto bad;
|
||||
@@ -353,7 +353,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
}
|
||||
if (MATCHES(*cur, "gid=")) {
|
||||
p = *cur + sizeof("gid=") - 1;
|
||||
user_gid = (gid_t) sudo_strtoid(p, NULL, NULL, &errstr);
|
||||
user_gid = (gid_t) sudo_strtoid(p, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
|
||||
goto bad;
|
||||
@@ -416,7 +416,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
}
|
||||
if (MATCHES(*cur, "sid=")) {
|
||||
p = *cur + sizeof("sid=") - 1;
|
||||
user_sid = (pid_t) sudo_strtoid(p, NULL, NULL, &errstr);
|
||||
user_sid = (pid_t) sudo_strtoid(p, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
|
||||
goto bad;
|
||||
|
Reference in New Issue
Block a user