Date: Tue, 25 Sep 2012 20:59:13 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240929 - head/sys/kern Message-ID: <201209252059.q8PKxDpn094711@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209252059.q8PKxDpn094711>