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:
@@ -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
|
||||
|
Reference in New Issue
Block a user