diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-06-11 16:58:25 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-06-11 17:00:37 -0700 |
commit | 6d4fa60ec343f69068faa1a5461cd6ac1a007a40 (patch) | |
tree | 299c1894665905bcd8c74a90bd14281dc2874c86 /ChangeLog | |
parent | 28496903f5855e7fc8295b7823e567c553f15550 (diff) | |
download | gnulib-6d4fa60ec343f69068faa1a5461cd6ac1a007a40.tar.gz |
fchmodat: port to old Linux kernel + newer headers
Problem reported by Lance Fredrickson in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html
* lib/fchmodat.c (fchmodat):
* lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to
whether syscalls work on ""; instead, if a call fails with
ENOENT assume that those syscalls do not work.
Do not use fstatat to determine whether a file is a symlink,
as this has problems with EOVERFLOW. Use readlinkat instead,
and if it fails with EINVAL then the file is not a symlink.
Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__
as this has been a maintenance hassle and it’s unlikely
these days that a new platform would #define O_PATH without also
either supporting /proc or keeping it absent.
* modules/fchmodat (Depends-on): Remove fstatat.
There should be no need for either fchmodat or lchmod to depend on
readlinkat, since they use readlinkat only in contexts where it
should work without Gnulib intervention.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1,3 +1,24 @@ +2022-06-11 Paul Eggert <eggert@cs.ucla.edu> + + fchmodat: port to old Linux kernel + newer headers + Problem reported by Lance Fredrickson in: + https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html + * lib/fchmodat.c (fchmodat): + * lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to + whether syscalls work on ""; instead, if a call fails with + ENOENT assume that those syscalls do not work. + Do not use fstatat to determine whether a file is a symlink, + as this has problems with EOVERFLOW. Use readlinkat instead, + and if it fails with EINVAL then the file is not a symlink. + Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__ + as this has been a maintenance hassle and it’s unlikely + these days that a new platform would #define O_PATH without also + either supporting /proc or keeping it absent. + * modules/fchmodat (Depends-on): Remove fstatat. + There should be no need for either fchmodat or lchmod to depend on + readlinkat, since they use readlinkat only in contexts where it + should work without Gnulib intervention. + 2022-06-06 Bruno Haible <bruno@clisp.org> fopen-gnu: Make this module work again (regression 2022-01-03). |