From: Paul Eggert Date: Mon, 22 Sep 2025 01:56:18 +0000 (-0700) Subject: fchownat: fix recently introduced flag typo X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b099a204c3cba47eec49a3c93d263ae7e4c2f8a;p=thirdparty%2Fgnulib.git fchownat: fix recently introduced flag typo Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2025-09/msg00282.html * lib/fchownat.c (rpl_fchownat): Fix typo by passing our flag to fstatat. --- diff --git a/ChangeLog b/ChangeLog index 27e3dea547..f61718951e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-09-21 Paul Eggert + + fchownat: fix recently introduced flag typo + Problem reported by Bruno Haible in: + https://lists.gnu.org/r/bug-gnulib/2025-09/msg00282.html + * lib/fchownat.c (rpl_fchownat): Fix typo by passing + our flag to fstatat. + 2025-09-21 Bruno Haible pthread-once: Improve configuration. diff --git a/lib/fchownat.c b/lib/fchownat.c index cce3a7abd4..a5e8bb8f47 100644 --- a/lib/fchownat.c +++ b/lib/fchownat.c @@ -135,7 +135,7 @@ rpl_fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag) || (CHOWN_TRAILING_SLASH_BUG && file[0] && file[strlen (file) - 1] == '/')) { - int r = fstatat (fd, file, &st, 0); + int r = fstatat (fd, file, &st, flag); /* EOVERFLOW means the file exists, which is all that the trailing slash check needs. */