summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-10 13:19:00 +0000
committerJim Meyering <jim@meyering.net>2003-02-10 13:19:00 +0000
commit81b7f5a4073e37661b6b6d0c615a8e34662902f7 (patch)
tree6f3dc2dc383fb27ec529d7eb0f89347e43660de3 /src
parentc2597b6041c599109563a8d733a1aeb04f98746b (diff)
downloadcoreutils-81b7f5a4073e37661b6b6d0c615a8e34662902f7.tar.xz
add comments and fix dumb typos
Diffstat (limited to 'src')
-rw-r--r--src/test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test.c b/src/test.c
index d52c3aef1..3b01f13d4 100644
--- 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, euid);
if (gid != egid)
- setregid (egid, gid);
+ setregid (gid, egid);
return result;
}