summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-12-20 15:32:10 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-12-20 15:32:10 +0100
commit041baa808e57756636411879af8a0a8801680884 (patch)
tree7687cc4cccb821ca1eb7e5c7bd42e0273ae9a4cd /auth
parent8451b436124bd7fdf9c907ebb24687dec10e12bf (diff)
Fix spurious authenticate EINTR
* auth/auth.c (S_auth_user_authenticate): Do not return EINTR if user is not pending any more, i.e. server actually already answered. (S_auth_server_authenticate): Do not return EINTR if server is not pending any more, i.e. user actually already answered.
Diffstat (limited to 'auth')
-rw-r--r--auth/auth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/auth/auth.c b/auth/auth.c
index fd7c018f..239b4fb3 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -327,7 +327,8 @@ S_auth_user_authenticate (struct authhandle *userauth,
u.user = userauth;
condition_init (&u.wakeup);
ports_interrupt_self_on_port_death (userauth, rendezvous);
- if (hurd_condition_wait (&u.wakeup, &pending_lock))
+ if (hurd_condition_wait (&u.wakeup, &pending_lock)
+ && hurd_ihash_find (&pending_users, rendezvous))
/* We were interrupted; remove our record. */
{
hurd_ihash_locp_remove (&pending_users, u.locp);
@@ -408,7 +409,8 @@ S_auth_server_authenticate (struct authhandle *serverauth,
s.passthrough = newport;
condition_init (&s.wakeup);
ports_interrupt_self_on_port_death (serverauth, rendezvous);
- if (hurd_condition_wait (&s.wakeup, &pending_lock))
+ if (hurd_condition_wait (&s.wakeup, &pending_lock)
+ && hurd_ihash_find (&pending_servers, rendezvous))
/* We were interrupted; remove our record. */
{
hurd_ihash_locp_remove (&pending_servers, s.locp);