summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-11-14 12:40:14 +0000
committerru <ru@FreeBSD.org>2002-11-14 12:40:14 +0000
commita9cd663da061d0e3d5e3a4bbbbce1cecdea59bcc (patch)
tree8d4620df7eae7121bdc3d5e20625f0b477b0759d /lib
parent57a6c5201893a7bbb755c329c168f987f1b6d165 (diff)
downloadFreeBSD-src-a9cd663da061d0e3d5e3a4bbbbce1cecdea59bcc.zip
FreeBSD-src-a9cd663da061d0e3d5e3a4bbbbce1cecdea59bcc.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/syslog.c1
1 files changed, 1 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud