diff options
author | friehm <friehm@cvs.openbsd.org> | 2017-10-23 08:39:27 +0000 |
---|---|---|
committer | friehm <friehm@cvs.openbsd.org> | 2017-10-23 08:39:27 +0000 |
commit | e76317b55ab419619bac00def8c84beca640574c (patch) | |
tree | d8b0e7e535e8237c9fff4c8338213c416daec147 /usr.sbin/cron | |
parent | 6cdd41d499ece7ff2637151938bae422327035b0 (diff) |
Close cron sockets in child processes.
ok jca@
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r-- | usr.sbin/cron/do_command.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c index be9050b7c5a..6a4022fcc9a 100644 --- a/usr.sbin/cron/do_command.c +++ b/usr.sbin/cron/do_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: do_command.c,v 1.56 2015/11/17 22:31:44 millert Exp $ */ +/* $OpenBSD: do_command.c,v 1.57 2017/10/23 08:39:26 friehm Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -86,6 +86,9 @@ child_process(entry *e, user *u) /* mark ourselves as different to PS command watchers */ setproctitle("running job"); + /* close sockets from parent (i.e. cronSock) */ + closefrom(3); + /* discover some useful and important environment settings */ usernm = e->pwd->pw_name; |