From: Jakub Jelinek Date: Thu, 12 Jul 2007 14:55:52 +0000 (+0000) Subject: 2007-02-17 Ulrich Drepper X-Git-Tag: cvs/fedora-glibc-2_5-20070712T1701~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5e842bacff307739f945282691538abbe31aaee;p=thirdparty%2Fglibc.git 2007-02-17 Ulrich Drepper [BZ #3842] * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Remove shortcut using __libc_enable_secure. --- diff --git a/ChangeLog b/ChangeLog index f121f4ff468..f8332f6d769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-17 Ulrich Drepper + + [BZ #3842] + * sysdeps/posix/euidaccess.c [_LIBC] (euidaccess): Remove shortcut + using __libc_enable_secure. + 2007-02-17 Ulrich Drepper [BZ #3348] diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c index 76a09d455d6..271fcd7128e 100644 --- a/sysdeps/posix/euidaccess.c +++ b/sysdeps/posix/euidaccess.c @@ -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