Branch
Hash :
f657c55c
Author :
Date :
2025-09-22T16:41:41
fchownat: improve on test failure fix * lib/fchownat.c (rpl_fchownat): Clear the flag only if the trailing slash check needs to be made. Do this before checking for the nofollow bug, to avoid the need for the fork+chdir+lchown dance in that case. Move the empty-filename check earlier, so that its file[0] check can more easily be combined with the trailing slash check. * m4/chown.m4, m4/fchownat.m4, modules/fchownat: Revert most recent change.
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
Description:
fchownat() function: Change the owner of a file at a directory.
Files:
lib/fchownat.c
lib/at-func.c
m4/fchownat.m4
Depends-on:
unistd-h
extensions
at-internal [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
bool [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
errno-h [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
extern-inline [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
fchdir [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
fcntl-h [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
filename [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
lchown [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
openat-die [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
openat-h [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
save-cwd [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
stat-time [test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1]
fstatat [test $REPLACE_FCHOWNAT = 1]
configure.ac:
gl_FUNC_FCHOWNAT
gl_CONDITIONAL([GL_COND_OBJ_FCHOWNAT],
[test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1])
gl_UNISTD_MODULE_INDICATOR([fchownat])
Makefile.am:
if GL_COND_OBJ_FCHOWNAT
lib_SOURCES += fchownat.c
endif
Include:
<unistd.h>
Link:
$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
License:
GPL
Maintainer:
Jim Meyering, Eric Blake, Paul Eggert