From e76317b55ab419619bac00def8c84beca640574c Mon Sep 17 00:00:00 2001 From: friehm Date: Mon, 23 Oct 2017 08:39:27 +0000 Subject: Close cron sockets in child processes. ok jca@ --- usr.sbin/cron/do_command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.sbin/cron') 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; -- cgit v1.2.3