diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-02-21 11:15:54 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-02-21 11:15:54 +0000 |
commit | b428b742cf54d423e5a7a68fcbec9473303eeafa (patch) | |
tree | a7eb4bb9273b2c48c1d4deacb5458f5075d902ef /sysdeps/posix | |
parent | 6c8cc2d3042d0585741452006c29cb21fbba39ea (diff) |
Updated to fedora-glibc-20070221T1011cvs/fedora-glibc-2_5_90-18
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/euidaccess.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c index 76a09d455d..333870cdde 100644 --- a/sysdeps/posix/euidaccess.c +++ b/sysdeps/posix/euidaccess.c @@ -1,5 +1,5 @@ /* Check if effective user id can access file - Copyright (C) 1990,1991,1995-2001,2005 Free Software Foundation, Inc. + Copyright (C) 1990,1991,1995-2001,2005,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -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 |