From ace8e189537d41e9c160139c50abbed07b146e3c Mon Sep 17 00:00:00 2001 From: Robert Manner Date: Mon, 6 Apr 2020 10:51:29 +0200 Subject: [PATCH] logsrvd/iolog_writer.c: treat runuid, rungid 0 as valid (usually ==root) --- logsrvd/iolog_writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logsrvd/iolog_writer.c b/logsrvd/iolog_writer.c index 86fc40a5e..f00147727 100644 --- a/logsrvd/iolog_writer.c +++ b/logsrvd/iolog_writer.c @@ -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 {