diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-06-06 23:20:45 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-06-06 23:20:45 +0000 |
commit | 1020578687b6174a183f3624dfdebbc6b6ca302e (patch) | |
tree | 1a2b0c2a9a72bc6b557923f14e4dc4d2b0df7eee | |
parent | 855daab8d0e8b3b8bbe621fd34866e12b612f83c (diff) |
fix fd leak on SIGHUP after config change, spotted by Stephen Marley; ok avsm@
-rw-r--r-- | usr.sbin/syslogd/privsep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/privsep.c b/usr.sbin/syslogd/privsep.c index 6e031133901..572d30f46f6 100644 --- a/usr.sbin/syslogd/privsep.c +++ b/usr.sbin/syslogd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.25 2005/05/23 20:12:28 henning Exp $ */ +/* $OpenBSD: privsep.c,v 1.26 2005/06/06 23:20:44 djm Exp $ */ /* * Copyright (c) 2003 Anil Madhavapeddy <anil@recoil.org> @@ -326,6 +326,8 @@ priv_init(char *conf, int numeric, int lockfd, int nullfd, char *argv[]) } } + close(socks[0]); + /* Unlink any domain sockets that have been opened */ for (i = 0; i < nfunix; i++) if (funixn[i] != NULL && pfd[PFD_UNIX_0 + i].fd != -1) |