Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/sys/utimensat.2
Show All 25 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 | .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 20, 2018 | .Dd November 11, 2018 | ||||
.Dt UTIMENSAT 2 | .Dt UTIMENSAT 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm futimens , | .Nm futimens , | ||||
.Nm utimensat | .Nm utimensat | ||||
.Nd set file access and modification times | .Nd set file access and modification times | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
If | If | ||||
.Fa path | .Fa path | ||||
names a symbolic link, the symbolic link's times are changed. | names a symbolic link, the symbolic link's times are changed. | ||||
By default, | By default, | ||||
.Fn utimensat | .Fn utimensat | ||||
changes the times of the file referenced by the symbolic link. | changes the times of the file referenced by the symbolic link. | ||||
.It Dv AT_BENEATH | .It Dv AT_BENEATH | ||||
Only allow to change the times of a file which is beneath of | Only allow to change the times of a file which is beneath of | ||||
the starting directory. | the topping directory. | ||||
See the description of the | |||||
.Dv O_BENEATH | |||||
flag in the | |||||
.Xr open 2 | |||||
manual page. | |||||
.El | .El | ||||
.Sh RETURN VALUES | .Sh RETURN VALUES | ||||
.Rv -std | .Rv -std | ||||
.Sh COMPATIBILITY | .Sh COMPATIBILITY | ||||
If the running kernel does not support this system call, | If the running kernel does not support this system call, | ||||
a wrapper emulates it using | a wrapper emulates it using | ||||
.Xr fstatat 2 , | .Xr fstatat 2 , | ||||
.Xr futimesat 2 | .Xr futimesat 2 | ||||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
The | The | ||||
.Fa path | .Fa path | ||||
argument is not an absolute path and | argument is not an absolute path and | ||||
.Fa fd | .Fa fd | ||||
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 ENOTCAPABLE | .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 fd , | |||||
and the process is in capability mode. | |||||
.It Bq Er ENOTCAPABLE | |||||
The | The | ||||
.Dv AT_BENEATH | .Dv AT_BENEATH | ||||
flag was specified but | flag was provided to | ||||
.Fn utimensat , | |||||
and the absolute | |||||
.Fa path | .Fa path | ||||
is not strictly relative to the starting directory. | does not have its tail fully contained under the topping directory, | ||||
For example, | or the relative | ||||
.Fa path | .Fa path | ||||
is absolute or includes a ".." component that escapes the starting directory. | escapes it. | ||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr chflags 2 , | .Xr chflags 2 , | ||||
.Xr stat 2 , | .Xr stat 2 , | ||||
.Xr symlink 2 , | .Xr symlink 2 , | ||||
.Xr utimes 2 , | .Xr utimes 2 , | ||||
.Xr utime 3 , | .Xr utime 3 , | ||||
.Xr symlink 7 | .Xr symlink 7 | ||||
Show All 14 Lines |