diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | log.c | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -12,6 +12,9 @@ | |||
12 | - dtucker@cvs.openbsd.org 2007/04/23 10:15:39 | 12 | - dtucker@cvs.openbsd.org 2007/04/23 10:15:39 |
13 | [servconf.c] | 13 | [servconf.c] |
14 | Remove debug() left over from development. ok deraadt@ | 14 | Remove debug() left over from development. ok deraadt@ |
15 | - djm@cvs.openbsd.org 2007/05/17 07:50:31 | ||
16 | [log.c] | ||
17 | save and restore errno when logging; ok deraadt@ | ||
15 | 18 | ||
16 | 20070509 | 19 | 20070509 |
17 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. | 20 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. |
@@ -2912,4 +2915,4 @@ | |||
2912 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 2915 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
2913 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 2916 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
2914 | 2917 | ||
2915 | $Id: ChangeLog,v 1.4663 2007/05/20 05:03:15 dtucker Exp $ | 2918 | $Id: ChangeLog,v 1.4664 2007/05/20 05:08:15 dtucker Exp $ |
@@ -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 | } |