logsrvd/iolog_writer.c: treat runuid, rungid 0 as valid (usually ==root)
This commit is contained in:

committed by
Todd C. Miller

parent
e31e0c4d3f
commit
ace8e18953
@@ -234,7 +234,7 @@ iolog_details_fill(struct iolog_details *details, TimeSpec *submit_time,
|
|||||||
if (!has_numval(info)) {
|
if (!has_numval(info)) {
|
||||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||||
"rungid specified but not a number");
|
"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,
|
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||||
"rungid (%" PRId64 ") out of range", info->numval);
|
"rungid (%" PRId64 ") out of range", info->numval);
|
||||||
} else {
|
} else {
|
||||||
@@ -260,7 +260,7 @@ iolog_details_fill(struct iolog_details *details, TimeSpec *submit_time,
|
|||||||
if (!has_numval(info)) {
|
if (!has_numval(info)) {
|
||||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||||
"runuid specified but not a number");
|
"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,
|
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||||
"runuid (%" PRId64 ") out of range", info->numval);
|
"runuid (%" PRId64 ") out of range", info->numval);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user