diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:40:29 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:40:29 +0000 |
commit | a25ec0b132c44c9e341e08464ff830de06b81126 (patch) | |
tree | e20842d80f9e25cb6cf09525abea63f7bf655dd7 /log.c | |
parent | 1b816ea846aca3ee89e7995373ace609e9518424 (diff) | |
parent | 70847d299887abb96f8703ca99db6d817b78960e (diff) |
import openssh-4.7p1-gsskex-20070927.patch
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */ | 1 | /* $OpenBSD: log.c,v 1.40 2007/05/17 07:50:31 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -44,6 +44,7 @@ | |||
44 | #include <string.h> | 44 | #include <string.h> |
45 | #include <syslog.h> | 45 | #include <syslog.h> |
46 | #include <unistd.h> | 46 | #include <unistd.h> |
47 | #include <errno.h> | ||
47 | #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) | 48 | #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) |
48 | # include <vis.h> | 49 | # include <vis.h> |
49 | #endif | 50 | #endif |
@@ -313,6 +314,7 @@ do_log(LogLevel level, const char *fmt, va_list args) | |||
313 | char fmtbuf[MSGBUFSIZ]; | 314 | char fmtbuf[MSGBUFSIZ]; |
314 | char *txt = NULL; | 315 | char *txt = NULL; |
315 | int pri = LOG_INFO; | 316 | int pri = LOG_INFO; |
317 | int saved_errno = errno; | ||
316 | 318 | ||
317 | if (level > log_level) | 319 | if (level > log_level) |
318 | return; | 320 | return; |
@@ -373,4 +375,5 @@ do_log(LogLevel level, const char *fmt, va_list args) | |||
373 | closelog(); | 375 | closelog(); |
374 | #endif | 376 | #endif |
375 | } | 377 | } |
378 | errno = saved_errno; | ||
376 | } | 379 | } |