diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-07-19 04:48:41 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-07-19 04:48:41 +0000 |
commit | f1e62b7bb2e67bd0cb2464d7225214242b717ac0 (patch) | |
tree | a223b46b22e3db7a9d204c89cf250ab784c0ffb3 /auth/auth.c | |
parent | 8ad48f6ce444648397d82b107cd196c24599d7cb (diff) | |
download | hurd-f1e62b7bb2e67bd0cb2464d7225214242b717ac0.tar.gz hurd-f1e62b7bb2e67bd0cb2464d7225214242b717ac0.tar.bz2 hurd-f1e62b7bb2e67bd0cb2464d7225214242b717ac0.zip |
*** empty log message ***
Diffstat (limited to 'auth/auth.c')
-rw-r--r-- | auth/auth.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/auth/auth.c b/auth/auth.c index ebef00b4..d77c484e 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -143,8 +143,12 @@ S_auth_makeauth (struct authhandle *auth, /* Verify that the union of the handles passed in either contains euid 0 (root), or contains all the requested ids. */ -#define isuid(uid, auth) idvec_contains (&(auth)->euids, uid) -#define groupmember(gid, auth) idvec_contains (&(auth)->egids, gid) +#define isuid(uid, auth) \ + (idvec_contains (&(auth)->euids, uid) \ + || idvec_contains (&(auth)->auids, uid)) +#define groupmember(gid, auth) \ + (idvec_contains (&(auth)->egids, gid) \ + || idvec_contains (&(auth)->agids, gid)) #define isroot(auth) isuid (0, auth) for (i = 0; i < nauths; i++) @@ -225,8 +229,9 @@ S_auth_makeauth (struct authhandle *auth, if (! err) { for (j = 1; j < nauths; ++j) - mach_port_deallocate (mach_task_self (), authpts[j]); + mach_port_deallocate (mach_task_self (), authpts[j - 1]); *newhandle = ports_get_right (newauth); + ports_port_deref (newauth); } for (j = 1; j < nauths; j++) |