From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 01:05:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C44C484C; Thu, 5 Sep 2013 01:05:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 983AF27CE; Thu, 5 Sep 2013 01:05:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8515n88094358; Thu, 5 Sep 2013 01:05:49 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8515nf3094355; Thu, 5 Sep 2013 01:05:49 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050105.r8515nf3094355@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 01:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255227 - in head: . usr.sbin/rwhod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 01:05:49 -0000 Author: pjd Date: Thu Sep 5 01:05:48 2013 New Revision: 255227 URL: http://svnweb.freebsd.org/changeset/base/255227 Log: Remove fallback to fork(2) if pdfork(2) is not available. If the parent process dies, the process descriptor will be closed and pdfork(2)ed child will be killed, which is not the case when regular fork(2) is used. The PROCDESC option is now part of the GENERIC kernel configuration, so we can start depending on it. Add UPDATING entry to inform that this option is now required and log detailed instruction to syslog if pdfork(2) is not available: The pdfork(2) system call is not available; recompile the kernel with options PROCDESC Submitted by: Mariusz Zaborski Sponsored by: Google Summer of Code 2013 Modified: head/UPDATING head/usr.sbin/rwhod/rwhod.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Sep 5 00:53:01 2013 (r255226) +++ head/UPDATING Thu Sep 5 01:05:48 2013 (r255227) @@ -32,6 +32,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20130905: + The PROCDESC kernel option is now part of the GENERIC kernel + configuration and is required for the rwhod(8) to work. + If you are using custom kernel configuration, you should include + 'options PROCDESC'. + +20130905: The API and ABI related to the Capsicum framework was modified in backward incompatible way. The userland libraries and programs have to be recompiled to work with the new kernel. This includes the Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Thu Sep 5 00:53:01 2013 (r255226) +++ head/usr.sbin/rwhod/rwhod.c Thu Sep 5 01:05:48 2013 (r255227) @@ -274,21 +274,17 @@ main(int argc, char *argv[]) exit(1); if (!quiet_mode) { pid_child_receiver = pdfork(&fdp, 0); - if (pid_child_receiver == -1) { - if (errno != ENOSYS) { - syslog(LOG_ERR, "pdfork: %m"); - exit(1); - } else { - pid_child_receiver = fork(); - fdp = -1; - } - } if (pid_child_receiver == 0) { receiver_process(); } else if (pid_child_receiver > 0) { sender_process(); } else if (pid_child_receiver == -1) { - syslog(LOG_ERR, "pdfork: %m"); + if (errno == ENOSYS) { + syslog(LOG_ERR, + "The pdfork(2) system call is not available; recompile the kernel with options PROCDESC"); + } else { + syslog(LOG_ERR, "pdfork: %m"); + } exit(1); } } else {