2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Check preserve_groups and ignore_ticket args with atobool instead

of assuming they are true if present.
This commit is contained in:
Todd C. Miller
2010-03-22 08:09:50 -04:00
parent 066e6a7e8f
commit 0ea44bcba1

View File

@@ -1153,11 +1153,13 @@ deserialize_info(char * const settings[], char * const user_info[])
continue;
}
if (MATCHES(*cur, "preserve_groups=")) {
SET(flags, MODE_PRESERVE_GROUPS);
if (atobool(*cur + sizeof("preserve_groups=") - 1) == TRUE)
SET(flags, MODE_PRESERVE_GROUPS);
continue;
}
if (MATCHES(*cur, "ignore_ticket=")) {
SET(flags, MODE_IGNORE_TICKET);
if (atobool(*cur + sizeof("ignore_ticket=") - 1) == TRUE)
SET(flags, MODE_IGNORE_TICKET);
continue;
}
if (MATCHES(*cur, "login_class=")) {