1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

Require CAP_CREATE on directory descriptor for symlinkat(2).

Sponsored by:	FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
Pawel Jakub Dawidek 2012-09-25 20:59:12 +00:00
parent d2e166e654
commit cffcbad2bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240929

View File

@ -1719,8 +1719,8 @@ kern_symlinkat(struct thread *td, char *path1, int fd, char *path2,
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);