[PATCH 1/2] io: drop nonnull attribute for fchmodat, faccessat, fchownat's path argument [BZ #34313]

Sam James <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <bfa56ad76046ece00a818c0b7855cd34c50bd3a2.1788021426.git.sam@gentoo.org>
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
---
 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.  */

base-commit: 6a46a9b6ece66cdb274a353ae8fe07943f381981
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.