From 9e6649f31e1769ca3b2545993ef51f2039848719 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Feb 2016 20:29:11 +0100 Subject: Fix hang on reauthentication One needs to keep the port being reauthenticated alive until we are sure the server has complete authentication. * libfshelp/fetch-root.c (fshelp_fetch_root): Deallocate `port' after auth_user_authenticate has completed. * trans/fakeroot.c (netfs_S_dir_lookup): Likewise with `file'. --- trans/fakeroot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trans') diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 84b4efcb2..64f320816 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -308,10 +308,10 @@ netfs_S_dir_lookup (struct protid *diruser, err = io_reauthenticate (file, ref, MACH_MSG_TYPE_MAKE_SEND); if (! err) { - mach_port_deallocate (mach_task_self (), file); err = auth_user_authenticate (fakeroot_auth_port, ref, MACH_MSG_TYPE_MAKE_SEND, &dir); + mach_port_deallocate (mach_task_self (), file); } mach_port_destroy (mach_task_self (), ref); if (err) -- cgit v1.2.3