summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2018-03-28 16:55:45 +0000
committeremaste <emaste@FreeBSD.org>2018-03-28 16:55:45 +0000
commit897710e98a0b0e19215469cbc1bad8edced933e8 (patch)
treecdb7223c32baf6f81d4a639655aa0692450bb38b
parente074689606c753e3328382618715757c0c2c0122 (diff)
downloadFreeBSD-src-897710e98a0b0e19215469cbc1bad8edced933e8.zip
FreeBSD-src-897710e98a0b0e19215469cbc1bad8edced933e8.tar.gz
MFC r323623: rename(2): document capability mode errors
Sponsored by: The FreeBSD Foundation
-rw-r--r--lib/libc/sys/rename.225
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2
index b98edd5..7f8c1e6 100644
--- a/lib/libc/sys/rename.2
+++ b/lib/libc/sys/rename.2
@@ -28,7 +28,7 @@
.\" @(#)rename.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd April 10, 2008
+.Dd September 15, 2017
.Dt RENAME 2
.Os
.Sh NAME
@@ -252,6 +252,9 @@ The
.Fa to
argument
is a directory and is not empty.
+.It Bq Er ECAPMODE
+.Fn rename
+was called and the process is in capability mode.
.El
.Pp
In addition to the errors returned by the
@@ -288,6 +291,26 @@ argument is not an absolute path and
is neither
.Dv AT_FDCWD
nor a file descriptor associated with a directory.
+.It Bq Er ECAPMODE
+.Dv AT_FDCWD
+is specified and the process is in capability mode.
+.It Bq Er ENOTCAPABLE
+.Fa path
+is an absolute path or contained a ".." component leading to a directory
+outside of the directory hierarchy specified by
+.Fa fromfd
+or
+.Fa tofd .
+.It Bq Er ENOTCAPABLE
+The
+.Fa fromfd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_SOURCE
+right, or the
+.Fa tofd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_TARGET
+right.
.El
.Sh SEE ALSO
.Xr chflags 2 ,
OpenPOWER on IntegriCloud