]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If the target file already exists, check for the CAP_UNLINKAT capabiity right
authorpjd <pjd@FreeBSD.org>
Sat, 2 Mar 2013 09:58:47 +0000 (09:58 +0000)
committerpjd <pjd@FreeBSD.org>
Sat, 2 Mar 2013 09:58:47 +0000 (09:58 +0000)
commit73650b4f3af1f7c8b2448569209fcdff427c08db
treeed319d846a836186fac46278b94b45c60866038d
parentf77596bc521b671974f181500d0c32e3836d24ab
If the target file already exists, check for the CAP_UNLINKAT capabiity right
on the target directory descriptor, but only if this is renameat(2) and real
target directory descriptor is given (not AT_FDCWD). Without this fix regular
rename(2) fails if the target file already exists.

Reported by: Michael Butler <imb@protected-networks.net>
Reported by: Larry Rosenman <ler@lerctr.org>
Sponsored by: The FreeBSD Foundation
sys/kern/vfs_syscalls.c