projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2597b6
)
add comments and fix dumb typos
author
Jim Meyering
<jim@meyering.net>
Mon, 10 Feb 2003 13:19:00 +0000
(13:19 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 10 Feb 2003 13:19:00 +0000
(13:19 +0000)
src/test.c
patch
|
blob
|
history
diff --git
a/src/test.c
b/src/test.c
index
d52c3ae
..
3b01f13
100644
(file)
--- a/
src/test.c
+++ b/
src/test.c
@@
-155,6
+155,7
@@
eaccess (char const *file, int mode)
egid = getegid ();
}
+ /* Set the real user and group IDs to the effective ones. */
if (uid != euid)
setreuid (euid, uid);
if (gid != egid)
@@
-162,10
+163,11
@@
eaccess (char const *file, int mode)
result = access (file, mode);
+ /* Restore them. */
if (uid != euid)
- setreuid (
euid,
uid);
+ setreuid (
uid, e
uid);
if (gid != egid)
- setregid (
egid,
gid);
+ setregid (
gid, e
gid);
return result;
}