Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/rename.2
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | |||||
.Ql .\& | .Ql .\& | ||||
or | or | ||||
.Ql \&.. . | .Ql \&.. . | ||||
.It Bq Er ENOTEMPTY | .It Bq Er ENOTEMPTY | ||||
The | The | ||||
.Fa to | .Fa to | ||||
argument | argument | ||||
is a directory and is not empty. | is a directory and is not empty. | ||||
.It Bq Er ECAPMODE | |||||
.Fn rename | |||||
was called and the process is in capability mode. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
In addition to the errors returned by the | In addition to the errors returned by the | ||||
.Fn rename , | .Fn rename , | ||||
the | the | ||||
.Fn renameat | .Fn renameat | ||||
may fail if: | may fail if: | ||||
.Bl -tag -width Er | .Bl -tag -width Er | ||||
Show All 20 Lines | |||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
nor a file descriptor associated with a directory, or the | nor a file descriptor associated with a directory, or the | ||||
.Fa to | .Fa to | ||||
argument is not an absolute path and | argument is not an absolute path and | ||||
.Fa tofd | .Fa tofd | ||||
is neither | is neither | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
nor a file descriptor associated with a directory. | 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 | |||||
above the | |||||
.Fa fromfd | |||||
or | |||||
.Fa tofd | |||||
directory file descriptor. | |||||
.It Bq Er ENOTCAPABLE | |||||
The | |||||
.Fa fromfd | |||||
directory file descriptor lacks the | |||||
.Dv CAP_RENAMEAT_SOURCE | |||||
right, or the | |||||
.Fa tofd | |||||
descriptor lacks the | |||||
.Dv CAP_RENAMEAT_TARGET | |||||
right. | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr chflags 2 , | .Xr chflags 2 , | ||||
.Xr open 2 , | .Xr open 2 , | ||||
.Xr symlink 7 | .Xr symlink 7 | ||||
.Sh STANDARDS | .Sh STANDARDS | ||||
The | The | ||||
.Fn rename | .Fn rename | ||||
Show All 10 Lines |