From owner-svn-src-all@FreeBSD.ORG Tue Sep 25 20:59:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3C51065670; Tue, 25 Sep 2012 20:59:13 +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 7AF398FC17; Tue, 25 Sep 2012 20:59:13 +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 q8PKxDHr094713; Tue, 25 Sep 2012 20:59:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8PKxDpn094711; Tue, 25 Sep 2012 20:59:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201209252059.q8PKxDpn094711@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Sep 2012 20:59:13 +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: r240929 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2012 20:59:13 -0000 Author: pjd Date: Tue Sep 25 20:59:12 2012 New Revision: 240929 URL: http://svn.freebsd.org/changeset/base/240929 Log: Require CAP_CREATE on directory descriptor for symlinkat(2). Sponsored by: FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Sep 25 20:58:15 2012 (r240928) +++ head/sys/kern/vfs_syscalls.c Tue Sep 25 20:59:12 2012 (r240929) @@ -1719,8 +1719,8 @@ kern_symlinkat(struct thread *td, char * AUDIT_ARG_TEXT(syspath); restart: bwillwrite(); - NDINIT_AT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - segflg, path2, fd, td); + NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | + AUDITVNODE1, segflg, path2, fd, CAP_CREATE, td); if ((error = namei(&nd)) != 0) goto out; vfslocked = NDHASGIANT(&nd);