add comments and fix dumb typos

This commit is contained in:
Jim Meyering 2003-02-10 13:19:00 +00:00
parent c2597b6041
commit 81b7f5a407

View File

@ -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;
}