From 5bcfeca12b295908453c9045965842feb9e63ced Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 29 Aug 2026 16:54:46 +0100 Subject: [PATCH] io: drop nonnull attribute for fchmodat, faccessat, fchownat's path argument [BZ #34313] Since Linux 6.11, AT_EMPTY_PATH can be used for a NULL path argument, so the nonnull attribute is no longer sound. Drop it. This bug was worked around in gnulib's 6db27b4dd36eda618db20e997ff56bbed7fce3cb. See also 55618e13968a60b89e5b226a23afaa8f17c5ef48 which fixed fstatat in glibc. Bug: https://sourceware.org/PR34313 Reviewed-by: Paul Eggert --- io/sys/stat.h | 2 +- posix/unistd.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/io/sys/stat.h b/io/sys/stat.h index 3069e187b0..ff70b69f59 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -370,7 +370,7 @@ extern int fchmod (int __fd, __mode_t __mode) __THROW; the directory FD is open on. */ extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) - __THROW __nonnull ((2)) __wur; + __THROW __wur; #endif /* Use ATFILE. */ diff --git a/posix/unistd.h b/posix/unistd.h index 06a6a88b52..dc5c2ec009 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -307,7 +307,7 @@ extern int execveat (int __fd, const char *__path, char *const __argv[], If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', otherwise use real IDs like `access'. */ extern int faccessat (int __fd, const char *__file, int __type, int __flag) - __THROW __nonnull ((2)) __wur; + __THROW __wur; #endif /* Use GNU. */ @@ -510,7 +510,7 @@ extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) on. */ extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) - __THROW __nonnull ((2)) __wur; + __THROW __wur; #endif /* Use GNU. */ /* Change the process's working directory to PATH. */