]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
euidaccess fixes
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Jul 2004 07:40:32 +0000 (07:40 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Jul 2004 07:40:32 +0000 (07:40 +0000)
ChangeLog
lib/ChangeLog
m4/ChangeLog

index 4adcfae39e655a036633e866b76f0e8a31c53d2e..d2468f4262b5b775551c0474f3e8dae723a8f02c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * src/pathchk.c: Include euidaccess.h.
+       (dir_ok): Use euidaccess, not access.
+       * src/test.c (R_OK, W_OK, X_OK, FOK): Remove; system.h defines them.
+       (eaccess): Remove.  All users changed to use euidaccess instead.
+
 2004-07-24  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/uptime.c (print_uptime) [defined BOOT_MSG]:
@@ -14,7 +21,7 @@
        --max-consecutive-size-changes options.  Fix another related bug:
        "tail" got confused if stdin, stdout, or stderr were closed.
        Also, use output buffering even with "tail -f".
-       
+
        * NEWS: Document this, plus yesterday's patch.
        * doc/coreutils.texi (tail invocation): "size has remained the same"
        -> "file has not changed", which is more accurate for fifos.
@@ -45,7 +52,7 @@
        files.
        (tail_forever, main): Redo fflush strategy to work even when input
        is nonblocking.  Don't use unbuffered output; just flush when needed.
-       
+
 2004-07-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/tail.c (main): Ignore -f if no file operand is specified
@@ -56,7 +63,7 @@
        * tests/tail/Test.pm: Reinstate f-1 test, since we now pass.
        Add a new commented-out f-2 test, which we still fail.
        (test_vector): All f-* tests are special cases, not just f-1.
-       
+
 2004-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/uptime.c: Include c-strtod.h.
@@ -70,7 +77,7 @@
        Now returns long double.  All uses changed.
        (print_direc): Use "L" length modifier when printing floating point
        numbers, since we're now printing long double.
-       
+
 2004-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Version 5.3.0.
index 00530f849ec8419016ebd9110ca4db2f619bbfeb..6efb09a1a07a35577884dc39c520ab9d5c8faf3b 100644 (file)
@@ -1,3 +1,30 @@
+2004-07-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * euidaccess.c [!defined LIBC]: Included group-member.h, stat-macros.h.
+       (S_IXUSR, S_IXGRP, S_IXOTH, S_IROTH, S_IWOTH, S_IXOTH):
+       Remove; now done by stat-macros.h.
+       (NGROUPS_MAX, group_member): Remove; now down by group-member.h.
+       No need to include <limits.h>.
+       (errno): Remove decl; we now assume C89 or better.
+       (access, getuid, getgid, geteuid, getegid, stat) [defined _LIBC]:
+       New macros.
+       (uid, gid, have_ids): Remove these static variables.
+       They weren't accurate for programs that also invoked setreuid etc.
+       (euidaccess) [defined EFF_ONLY_OK || defined ACC_SELF ||
+       HAVE_DECL_EACCSS]: Use builtin substitutes.
+       [defined _LIBC]: Ignore __libc_enable_secure; it's not a
+       correct optimization for programs run as root that later
+       invoke setreuid.
+       [no builtin substitutes && HAVE_DECL_SETREGID &&
+       PREFER_NONREENTRANT_EUIDACCESS]:
+       Use setreuid+setregid to get the correct answer.
+       [no builtin substitutes && ! (HAVE_DECL_SETREGID &&
+       PREFER_NONREENTRANT_EUIDACCESS)]:
+       Don't assume that the stat macros have their historical values,
+       as POSIX doesn't require this.
+       [defined TEST]: Include <stdlib.h>; don't include errno.h
+       twice; include <error.h> rather than "error.h".
+
 2004-07-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Makefile.am (libfetish_a_SOURCES): Add fcntl-safer.h,
@@ -21,7 +48,7 @@
        Don't assume that buffer will be properly terminated by 'read'.
        Use c_strtod instead of setlocale.
        (main) [defined TEST]: Return int, not void.
-       
+
 2004-07-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Makefile.am (libfetish_a_SOURCES): Add c-strtold.c.
index cbe52e04557efba1f23043d11121de71a987eb0f..ad8561d0c2637c44c157dc193327fb5d5b0f8450 100644 (file)
@@ -1,3 +1,13 @@
+2004-07-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS): New macro.
+       (gl_FUNC_EUIDACCESS): Use AC_CHECK_DECLS_ONCE, not AC_CHECK_DECLS.
+       (gl_PREREQ_EUIDACCESS): Check for eaccess and setregid decls.
+       Require AC_HEADER_STAT.
+
+       * prereq.m4 (gl_PREREQ): Invoke gl_FUNC_NONREENTRANT_EUIDACCESS,
+       not gl_FUNC_EUIDACCESS.
+
 2004-07-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        * prereq.m4 (gl_PREREQ): Add gl_FCNTL_SAFER.