diff options
author | Carl Fredrik Hammar <hammy.lite@gmail.com> | 2012-07-01 22:18:12 +0200 |
---|---|---|
committer | Fredrik Hammar <carl.fredrik.hammar@gmail.com> | 2012-07-01 22:18:12 +0200 |
commit | 0a56227766bfc7ee00a3d983e594ab81fc82b72a (patch) | |
tree | c37988d798648c608a399932b4f12b0ac78a5691 /auth/auth.c | |
parent | 8b6089338dec0dcdc9765708952520ee865a5e8d (diff) |
Check for null ports in auth server
* auth/auth.c (S_auth_user_authenticate, S_auth_server_authenticate):
Fail with EINVAL if RENDEZVOUS is MACH_PORT_NULL.
Diffstat (limited to 'auth/auth.c')
-rw-r--r-- | auth/auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auth/auth.c b/auth/auth.c index 11db0f8f..ec738ce2 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -305,7 +305,7 @@ S_auth_user_authenticate (struct authhandle *userauth, if (! userauth) return EOPNOTSUPP; - if (rendezvous == MACH_PORT_DEAD) /* Port died in transit. */ + if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD) return EINVAL; u.user = userauth; @@ -382,7 +382,7 @@ S_auth_server_authenticate (struct authhandle *serverauth, if (! serverauth) return EOPNOTSUPP; - if (rendezvous == MACH_PORT_DEAD) /* Port died in transit. */ + if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD) return EINVAL; mutex_lock (&pending_lock); |