From a9cd663da061d0e3d5e3a4bbbbce1cecdea59bcc Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 14 Nov 2002 12:40:14 +0000 Subject: Reset LogTag to NULL in closelog(3). This fixes mysterious crashes caused by dynamic PAM modules that call openlog(3) and closelog(3), e.g. ports/security/pam_pwdfile. What happened here is that the module first registered its "ident" with openlog(3), then PAM library unloaded module with dlclose(3), and the next call to syslog(3) resulted in SIGSEGV. MFC after: 3 days --- lib/libc/gen/syslog.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index fa19907..261dd10 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -335,6 +335,7 @@ closelog() { (void)_close(LogFile); LogFile = -1; + LogTag = NULL; connected = 0; } -- cgit v1.1