From 191c3043722f7a65670ab598cb69e9c11054ec79 Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Wed, 13 Feb 2002 08:37:55 +0000 Subject: [PATCH] Unlink all log sockets at startup. PR: misc/34839 Reviewed by: ru Approved by: ru Obtained from: OpenBSD MFC after: 2 weeks --- usr.sbin/syslogd/syslogd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index bc651fccdd2a..3893278a9ba4 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -444,6 +444,7 @@ main(argc, argv) #define SUN_LEN(unp) (strlen((unp)->sun_path) + 2) #endif for (i = 0; i < nfunix; i++) { + (void)unlink(funixn[i]); memset(&sunx, 0, sizeof(sunx)); sunx.sun_family = AF_UNIX; (void)strlcpy(sunx.sun_path, funixn[i], sizeof(sunx.sun_path));