From owner-svn-src-head@FreeBSD.ORG Wed Dec 19 12:14:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B994E212; Wed, 19 Dec 2012 12:14:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E0038FC14; Wed, 19 Dec 2012 12:14:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJCE8jr090295; Wed, 19 Dec 2012 12:14:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJCE8sF090294; Wed, 19 Dec 2012 12:14:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201212191214.qBJCE8sF090294@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 19 Dec 2012 12:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244429 - head/sys/kern 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: Wed, 19 Dec 2012 12:14:08 -0000 Author: pjd Date: Wed Dec 19 12:14:08 2012 New Revision: 244429 URL: http://svnweb.freebsd.org/changeset/base/244429 Log: The 'flags' argument can be modified in vn_open_cred(), so we need to set it for every loop interation. Pointed out by: kib Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Dec 19 12:12:53 2012 (r244428) +++ head/sys/kern/kern_sig.c Wed Dec 19 12:14:08 2012 (r244429) @@ -3125,12 +3125,12 @@ expand_name(const char *comm, uid_t uid, struct nameidata nd; int cmode, flags, oflags, error; - flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW; cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; oflags = VN_OPEN_NOAUDIT | (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); for (i = 0; i < num_cores; i++) { + flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW; name[indexpos] = '0' + i; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);