From: Todd C. Miller Date: Fri, 6 May 2016 15:26:45 +0000 (-0600) Subject: Check return value of restore_perms() in vlog_warning(). X-Git-Tag: SUDO_1_8_17^2~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b302e09aed3001d456b7744a5572a42f91a1d80;p=sudo Check return value of restore_perms() in vlog_warning(). Coverity CID 104079. --- diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index fd9e7b12d..ca82e49b3 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -477,8 +477,10 @@ vlog_warning(int flags, const char *fmt, va_list ap) rval = false; } - if (uid_changed) - restore_perms(); + if (uid_changed) { + if (!restore_perms()) + rval = false; + } free(logline);