From owner-svn-src-head@FreeBSD.ORG Tue Sep 25 21:11:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CBC7106564A; Tue, 25 Sep 2012 21:11:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 684118FC0A; Tue, 25 Sep 2012 21:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8PLBfHn096281; Tue, 25 Sep 2012 21:11:41 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8PLBfmc096279; Tue, 25 Sep 2012 21:11:41 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201209252111.q8PLBfmc096279@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Sep 2012 21:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240931 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 25 Sep 2012 21:11:41 -0000 Author: pjd Date: Tue Sep 25 21:11:40 2012 New Revision: 240931 URL: http://svn.freebsd.org/changeset/base/240931 Log: We cannot open file for reading and executing (O_RDONLY | O_EXEC). Well, in theory we can pass those two flags, because O_RDONLY is 0, but we won't be able to read from a descriptor opened with O_EXEC. Update the comment. Sponsored by: FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Sep 25 21:00:36 2012 (r240930) +++ head/sys/kern/kern_exec.c Tue Sep 25 21:11:40 2012 (r240931) @@ -441,10 +441,10 @@ interpret: } else { AUDIT_ARG_FD(args->fd); /* - * Some might argue that CAP_READ and/or CAP_MMAP should also - * be required here; such arguments will be entertained. + * Some might argue that CAP_MMAP should also be required here; + * such arguments will be entertained. * - * Descriptors opened only with O_EXEC or O_RDONLY are allowed. + * Descriptors opened only with O_EXEC are allowed. */ error = fgetvp_exec(td, args->fd, CAP_FEXECVE, &binvp); if (error)