[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fchownat test on AIX 7.1BETA
From: |
Bruno Haible |
Subject: |
Re: fchownat test on AIX 7.1BETA |
Date: |
Sat, 31 Jul 2010 16:02:45 +0200 |
User-agent: |
KMail/1.9.9 |
Rainer Tammer wrote:
> # ./testme
> ret = 0
And on Linux, the POSIX-correct result is:
ret = -1
errno = 20
Not a directory
Actually the code for working around this bug is already present in
lib/fchownat.c, conditionalized by CHOWN_TRAILING_SLASH_BUG. On your system,
the logs say:
checking whether chown honors trailing slash... no
gl_cv_func_chown_slash_works=${gl_cv_func_chown_slash_works=no}
so the only remaining problem is that fchownat.c is not compiled on your
system.
This should fix it. It was due to a commit of mine on 2010-04-10
<http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00075.html>
<http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00169.html>.
I should have reformatted this macro with proper indentation _before_
attempting to change its logic.
2010-07-31 Bruno Haible <address@hidden>
fchownat: Replace also when chown has the trailing slash bug.
* m4/openat.m4 (gl_FUNC_FCHOWNAT): Move the test of REPLACE_CHOWN
outside the gl_FUNC_FCHOWNAT_DEREF_BUG invocation. Fixes regression
introduced on 2010-04-10.
Reported by Rainer Tammer.
--- m4/openat.m4.orig Sat Jul 31 15:50:43 2010
+++ m4/openat.m4 Sat Jul 31 15:50:41 2010
@@ -1,4 +1,4 @@
-# serial 29
+# serial 30
# See if we need to use our replacement for Solaris' openat et al functions.
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
@@ -99,19 +99,22 @@
# If we have the fchownat function, and it has the bug (in glibc-2.4)
# that it dereferences symlinks even with AT_SYMLINK_NOFOLLOW, then
# use the replacement function.
+# Also if the fchownat function, like chown, has the trailing slash bug,
+# use the replacement function.
# Also use the replacement function if fchownat is simply not available.
AC_DEFUN([gl_FUNC_FCHOWNAT],
[
AC_REQUIRE([gl_FUNC_CHOWN])
AC_CHECK_FUNC([fchownat],
- [gl_FUNC_FCHOWNAT_DEREF_BUG([
- REPLACE_FCHOWNAT=1
- AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1],
- [Define to 1 if your platform has fchownat, but it cannot
- perform lchown tasks.])
- if test $REPLACE_CHOWN = 1; then
- REPLACE_FCHOWNAT=1
- fi])],
+ [gl_FUNC_FCHOWNAT_DEREF_BUG(
+ [REPLACE_FCHOWNAT=1
+ AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1],
+ [Define to 1 if your platform has fchownat, but it cannot
+ perform lchown tasks.])
+ ])
+ if test $REPLACE_CHOWN = 1; then
+ REPLACE_FCHOWNAT=1
+ fi],
[HAVE_FCHOWNAT=0])
if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
AC_LIBOBJ([fchownat])
- Re: iconv test on AIX 7.1BETA, (continued)
- Re: iconv test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- linkat test on AIX 7.1BETA, Bruno Haible, 2010/07/30
- Re: linkat test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- Re: linkat test on AIX 7.1BETA, Bruno Haible, 2010/07/31
- Re: linkat test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- Re: linkat test on AIX 7.1BETA, Bruno Haible, 2010/07/31
- fchownat test on AIX 7.1BETA, Bruno Haible, 2010/07/30
- Re: fchownat test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- Re: fchownat test on AIX 7.1BETA, Bruno Haible, 2010/07/31
- Re: fchownat test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- Re: fchownat test on AIX 7.1BETA,
Bruno Haible <=
- utimens, utimensat tests on AIX 7.1BETA, Bruno Haible, 2010/07/30
- Re: utimens, utimensat tests on AIX 7.1BETA, Eric Blake, 2010/07/30
- duplocale test on AIX 7.1BETA, Bruno Haible, 2010/07/30
- Re: duplocale test on AIX 7.1BETA, Rainer Tammer, 2010/07/31
- Re: duplocale test on AIX 7.1BETA, Bruno Haible, 2010/07/31
- Re: M4 1.4.14 on AIX 7.1BETA, Bruno Haible, 2010/07/30
- Re: M4 1.4.14 on AIX 7.1BETA, Eric Blake, 2010/07/30
- [PATCH] mknod: be more vocal about danger of running tests as root, Eric Blake, 2010/07/30
- Re: M4 1.4.14 on AIX 7.1BETA, Rainer Tammer, 2010/07/31
Re: M4 1.4.14 on AIX 7.1BETA, Rainer Tammer, 2010/07/30