2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00

logsrvd/iolog_writer.c: treat runuid, rungid 0 as valid (usually ==root)

This commit is contained in:
Robert Manner 2020-04-06 10:51:29 +02:00 committed by Todd C. Miller
parent e31e0c4d3f
commit ace8e18953

View File

@ -234,7 +234,7 @@ iolog_details_fill(struct iolog_details *details, TimeSpec *submit_time,
if (!has_numval(info)) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"rungid specified but not a number");
} else if (info->numval <= 0 || info->numval > INT_MAX) {
} else if (info->numval < 0 || info->numval > INT_MAX) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"rungid (%" PRId64 ") out of range", info->numval);
} else {
@ -260,7 +260,7 @@ iolog_details_fill(struct iolog_details *details, TimeSpec *submit_time,
if (!has_numval(info)) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"runuid specified but not a number");
} else if (info->numval <= 0 || info->numval > INT_MAX) {
} else if (info->numval < 0 || info->numval > INT_MAX) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"runuid (%" PRId64 ") out of range", info->numval);
} else {