summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-22 23:53:19 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-22 23:53:19 +0200
commitea9d181f270aa903a2f31d2d00deb18c1be9792e (patch)
tree27f3855ac9375e08f92464cbc2e0659c4d2404b5 /libshouldbeinlibc
parent131ce3a37dc93eaa62f3b7643772afa9276ed2d5 (diff)
Fix spurious destroy during RPC to self with rendez-vous
In that case we have two receive right references, which we should consume one per one, instead of destroying them all at once (and thus fail on second destroy) http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00045.html * libfshelp/fetch-root.c (fshelp_fetch_root): Unreference rendez-vous port receive right instead of destroying the port. * libshouldbeinlibc/exec-reauth.c (exec_reauth): Likewise.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/exec-reauth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshouldbeinlibc/exec-reauth.c b/libshouldbeinlibc/exec-reauth.c
index fa4aa59e..263b1408 100644
--- a/libshouldbeinlibc/exec-reauth.c
+++ b/libshouldbeinlibc/exec-reauth.c
@@ -59,7 +59,7 @@ exec_reauth (auth_t auth, int secure, int must_reauth,
if (!err)
err = auth_user_authenticate (auth, ref, MACH_MSG_TYPE_MAKE_SEND,
&newport);
- mach_port_destroy (mach_task_self (), ref);
+ mach_port_mod_refs (mach_task_self (), ref, MACH_PORT_RIGHT_RECEIVE, -1);
if (err)
{
if (must_reauth)