Konstantin Belousov 7cdb0b9d82 Fix renameat(2) for CAPABILITIES kernels.
When renameat(2) is used with:
- absolute path for to;
- tofd not set to AT_FDCWD;
- the target exists
kern_renameat() requires CAP_UNLINK capability on tofd, but
corresponding namei ni_filecap is not initialized at all because the
lookup is absolute.  As result, the check was done against empty filecap
and syscall fails erronously.

Fix it by creating a return flags namei member and reporting if the
lookup was absolute, then do not touch to.ni_filecaps at all.

PR:	222258
Reviewed by:	jilles, ngie
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
X-MFC-note:	KBI breakage
Differential revision:	https://reviews.freebsd.org/D19096
2019-02-08 04:18:17 +00:00
..
2018-12-07 15:19:00 +00:00
2018-11-29 03:44:02 +00:00
2019-01-27 00:46:06 +00:00
2019-01-17 04:51:05 +00:00
2018-12-05 16:43:03 +00:00
2018-12-08 06:30:41 +00:00
2018-10-30 21:35:56 +00:00
2018-10-22 02:35:12 +00:00
2017-12-13 16:30:39 +00:00
2019-02-04 21:28:25 +00:00
2018-12-29 21:18:01 +00:00
2018-10-12 00:32:45 +00:00
2018-08-18 19:45:56 +00:00
2018-04-08 16:34:10 +00:00
2018-06-01 13:26:45 +00:00
2018-11-20 14:58:41 +00:00
2018-10-25 15:40:59 +00:00
2018-11-20 14:59:27 +00:00
2018-12-07 15:19:00 +00:00
2019-01-31 22:58:17 +00:00
2018-06-01 13:26:45 +00:00
2019-01-16 05:15:57 +00:00
2018-11-19 00:54:31 +00:00
2018-10-23 21:43:41 +00:00
2019-01-08 09:04:27 +00:00