From 099d1a58f7bc088a9f71af6d32542ca3949468a3 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 29 Oct 2002 09:43:00 +0000 Subject: Vendor import of OpenSSH-portable 3.5p1. --- crypto/openssh/log.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'crypto/openssh/log.c') diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index c88f632..96626d7 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -34,7 +34,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: log.c,v 1.22 2002/02/22 12:20:34 markus Exp $"); +RCSID("$OpenBSD: log.c,v 1.24 2002/07/19 15:43:33 markus Exp $"); #include "log.h" #include "xmalloc.h" @@ -92,6 +92,7 @@ SyslogFacility log_facility_number(char *name) { int i; + if (name != NULL) for (i = 0; log_facilities[i].name; i++) if (strcasecmp(log_facilities[i].name, name) == 0) @@ -103,6 +104,7 @@ LogLevel log_level_number(char *name) { int i; + if (name != NULL) for (i = 0; log_levels[i].name; i++) if (strcasecmp(log_levels[i].name, name) == 0) @@ -116,6 +118,7 @@ void error(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_ERROR, fmt, args); va_end(args); @@ -127,6 +130,7 @@ void log(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_INFO, fmt, args); va_end(args); @@ -138,6 +142,7 @@ void verbose(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_VERBOSE, fmt, args); va_end(args); @@ -149,6 +154,7 @@ void debug(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG1, fmt, args); va_end(args); @@ -158,6 +164,7 @@ void debug2(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG2, fmt, args); va_end(args); @@ -167,6 +174,7 @@ void debug3(const char *fmt,...) { va_list args; + va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG3, fmt, args); va_end(args); @@ -215,6 +223,18 @@ fatal_remove_cleanup(void (*proc) (void *context), void *context) (u_long) proc, (u_long) context); } +/* Remove all cleanups, to be called after fork() */ +void +fatal_remove_all_cleanups(void) +{ + struct fatal_cleanup *cu, *next_cu; + + for (cu = fatal_cleanups; cu; cu = next_cu) { + next_cu = cu->next; + xfree(cu); + } +} + /* Cleanup and exit */ void fatal_cleanup(void) -- cgit v1.1