[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 15/17: Fix hang on reauthentication
From: |
Samuel Thibault |
Subject: |
[hurd] 15/17: Fix hang on reauthentication |
Date: |
Mon, 15 Feb 2016 09:10:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 9e6649f31e1769ca3b2545993ef51f2039848719
Author: Samuel Thibault <address@hidden>
Date: Sun Feb 14 20:29:11 2016 +0100
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'.
---
libfshelp/fetch-root.c | 2 +-
trans/fakeroot.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 1b6739e..d7761e5 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -75,10 +75,10 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
/* MAKE_SEND is safe here because we destroy REND ourselves. */
err = io_reauthenticate (port, rend,
MACH_MSG_TYPE_MAKE_SEND);
- mach_port_deallocate (mach_task_self (), port);
if (! err)
err = auth_user_authenticate (newauth, rend,
MACH_MSG_TYPE_MAKE_SEND, &ret);
+ mach_port_deallocate (mach_task_self (), port);
if (err)
ret = MACH_PORT_NULL;
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 84b4efc..64f3208 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)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (0aa179e -> ffaff64), Samuel Thibault, 2016/02/15
- [hurd] 03/17: procfs: Move setting default parameters to a separate function, Samuel Thibault, 2016/02/15
- [hurd] 11/17: Fixed leaks in _netfs_translator_callback2_fn, Samuel Thibault, 2016/02/15
- [hurd] 04/17: exec: remove duplicate function call, Samuel Thibault, 2016/02/15
- [hurd] 02/17: Fix typo, Samuel Thibault, 2016/02/15
- [hurd] 16/17: Fix function name, Samuel Thibault, 2016/02/15
- [hurd] 14/17: Make sure to complete auth_server_authenticate, Samuel Thibault, 2016/02/15
- [hurd] 15/17: Fix hang on reauthentication,
Samuel Thibault <=
- [hurd] 05/17: utils/settrans: improve --chroot functionality, Samuel Thibault, 2016/02/15
- [hurd] 08/17: mach-defpager: link dynamically, Samuel Thibault, 2016/02/15
- [hurd] 09/17: devnode: fix falling back to the kernel driver, Samuel Thibault, 2016/02/15
- [hurd] 01/17: Also build exec.static, Samuel Thibault, 2016/02/15
- [hurd] 12/17: utils/vmallocate: new utility, Samuel Thibault, 2016/02/15
- [hurd] 17/17: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2016/02/15
- [hurd] 06/17: Use refcount_t for peropen reference counting in libnetfs., Samuel Thibault, 2016/02/15
- [hurd] 07/17: Remove libfshelp/trans.h and libfshelp/locks.h., Samuel Thibault, 2016/02/15
- [hurd] 10/17: Check for a return value in netfs_make_peropen before using it in netfs_make_protid., Samuel Thibault, 2016/02/15
- [hurd] 13/17: Use libihash to store directory entries in ftpfs., Samuel Thibault, 2016/02/15