From ea9d181f270aa903a2f31d2d00deb18c1be9792e Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 22 Sep 2012 23:53:19 +0200 Subject: 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. --- libshouldbeinlibc/exec-reauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libshouldbeinlibc/exec-reauth.c') 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) -- cgit v1.2.3