]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-02-17 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:55:52 +0000 (14:55 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:55:52 +0000 (14:55 +0000)
[BZ #3842]
* sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Remove shortcut
using __libc_enable_secure.

ChangeLog
sysdeps/posix/euidaccess.c

index f121f4ff4680161e9049344141fda9de6e60d79e..f8332f6d7694da1d2519d0b293bfa871891b323e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-17  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #3842]
+       * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Remove shortcut
+       using __libc_enable_secure.
+
 2007-02-17  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #3348]
index 76a09d455d67297421456ba148b19d4d39c9a8c3..271fcd7128e0b3a37db88ebd21092d73f550fc02 100644 (file)
@@ -128,10 +128,6 @@ euidaccess (path, mode)
 #ifdef _LIBC
   uid_t euid;
   gid_t egid;
-
-  if (! __libc_enable_secure)
-    /* If we are not set-uid or set-gid, access does the same.  */
-    return __access (path, mode);
 #else
   if (have_ids == 0)
     {
@@ -162,6 +158,10 @@ euidaccess (path, mode)
   /* Now we need the IDs.  */
   euid = __geteuid ();
   egid = __getegid ();
+
+  if (__getuid () == euid && __getgid () == egid)
+    /* If we are not set-uid or set-gid, access does the same.  */
+    return __access (path, mode);
 #endif
 
   /* The super-user can read and write any file, and execute any file