Hash :
b1715e52
Author :
Date :
2025-01-05T17:45:41
utimensat: mention Linux kernel bug with CIFS * doc/posix-functions/utimensat.texi (utimensat): Mention Linux kernel bug reported by Bruno Haible in: https://lists.gnu.org/r/bug-tar/2024-12/msg00004.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
@node utimensat
@subsection @code{utimensat}
@findex utimensat
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/utimensat.html}
Gnulib module: utimensat
@mindex utimensat
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
glibc 2.5, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 3.0.
However, the replacement function may end up truncating timestamps to
worse resolution than supported by the file system. Furthermore, the
replacement function is not safe to be used in libraries and is not
multithread-safe.
@item
This function returns a bogus value instead of failing with
@code{ENOSYS} on some platforms:
Linux kernel 2.6.21.
@item
This function fails with @code{ENOSYS} if passed the flag
@code{AT_SYMLINK_NOFOLLOW} on a regular file:
Linux kernel 2.6.22.
@item
When using @code{UTIME_OMIT} or @code{UTIME_NOW}, some systems require
the @code{tv_sec} argument to be 0, and don't necessarily handle all
file permissions in the manner required by POSIX:
Linux kernel 2.6.25.
@item
When using @code{UTIME_OMIT} for the modification time, but specifying
an access time, some systems fail to update the change time:
Linux kernel 2.6.32, macOS 14, NetBSD 10.0, Solaris 11.1.
@item
Out-of-range values of @code{tv_nsec} do not lead to a failure on some
platforms:
Linux kernel 2.6.22.19 on hppa, NetBSD 10.0.
@item
On some platforms, this function mis-handles a trailing slash:
AIX 7.2.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
On file systems mounted with the @code{noatime} attribute,
this function might not modify the access time as requested:
Linux kernel 6.9.
@item
This function ignores the flag @code{AT_SYMLINK_NOFOLLOW}:
Linux kernel 6.8 on a CIFS file system.
@item
This function sets a slightly different time stamp than the requested one:
@c https://dev.haiku-os.org/ticket/19213
Haiku.
@item
On some platforms, timestamps of symbolic links cannot be modified, so
the replacement fails with @code{ENOSYS} if passed the flag
@code{AT_SYMLINK_NOFOLLOW} on a symlink.
@item
The mere act of using @code{lstat} modifies the access time of
symlinks on some platforms, so @code{utimensat} with
@code{AT_SYMLINK_NOFOLLOW} can only effectively change modification time:
Cygwin.
@item
The mere act of using @code{stat} modifies the access time of
directories on some platforms, so @code{utimensat} can only
effectively change directory modification time:
Cygwin 1.5.x.
@end itemize
@mindex fdutimensat
The gnulib module @code{fdutimensat} provides a similar interface.