diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/log.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c index 653875ddc25..6874ef697fe 100644 --- a/usr.bin/ssh/log.c +++ b/usr.bin/ssh/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */ +/* $OpenBSD: log.c,v 1.40 2007/05/17 07:50:31 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -42,6 +42,7 @@ #include <string.h> #include <syslog.h> #include <unistd.h> +#include <errno.h> #include <vis.h> #include "xmalloc.h" @@ -277,6 +278,7 @@ do_log(LogLevel level, const char *fmt, va_list args) char fmtbuf[MSGBUFSIZ]; char *txt = NULL; int pri = LOG_INFO; + int saved_errno = errno; if (level > log_level) return; @@ -330,4 +332,5 @@ do_log(LogLevel level, const char *fmt, va_list args) syslog_r(pri, &sdata, "%.500s", fmtbuf); closelog_r(&sdata); } + errno = saved_errno; } |