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

Use saved errno in vlog_warning() before calling sudo_vwarn_nodebug().

Fixes the error message printed if set_perms() fails.
This commit is contained in:
Todd C. Miller
2015-03-21 15:41:59 -06:00
parent cfeda97b0a
commit 3b30984406

View File

@@ -501,6 +501,7 @@ vlog_warning(int flags, const char *fmt, va_list ap)
sudo_warnx_nodebug(ngettext("%u incorrect password attempt",
"%u incorrect password attempts", tries), tries);
} else {
errno = serrno;
if (ISSET(flags, SLOG_USE_ERRNO))
sudo_vwarn_nodebug(_(fmt), ap2);
else