summaryrefslogtreecommitdiff
path: root/debian/patches/libdiskfs_self-reauth.patch
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-03-18 01:32:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-03-18 01:32:25 +0100
commita6fb3210360f37f31bd5954a8d4df938dc799afc (patch)
tree251dfb735802f992547481a6ca365da5a78b1d99 /debian/patches/libdiskfs_self-reauth.patch
parenteb540165c506563bcb2ae1b8df3dfe9a3ca153cc (diff)
Drop a receive right user reference, not a send right user reference
Diffstat (limited to 'debian/patches/libdiskfs_self-reauth.patch')
-rw-r--r--debian/patches/libdiskfs_self-reauth.patch7
1 files changed, 2 insertions, 5 deletions
diff --git a/debian/patches/libdiskfs_self-reauth.patch b/debian/patches/libdiskfs_self-reauth.patch
index c9650864..b3e048b2 100644
--- a/debian/patches/libdiskfs_self-reauth.patch
+++ b/debian/patches/libdiskfs_self-reauth.patch
@@ -2,9 +2,6 @@
http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00045.html
-I believe this shouldn't pose problem except a possible port leak in case port
-accounting is not correct somewhere.
-
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 54d3c0c..6585052 100644
--- a/libfshelp/fetch-root.c
@@ -16,7 +13,7 @@ index 54d3c0c..6585052 100644
- mach_port_destroy (mach_task_self (), rend);
+ /* crdir could be ourselves, and thus diskfs_S_io_reauthenticate
+ * would get the same name, so don't _destroy_ it !! */
-+ mach_port_deallocate (mach_task_self (), rend);
++ mach_port_mod_refs (mach_task_self (), rend, MACH_PORT_RIGHT_RECEIVE, -1);
return ret;
}
@@ -29,7 +26,7 @@ index dd267ef..12b34fc 100644
err = auth_user_authenticate (auth, ref, MACH_MSG_TYPE_MAKE_SEND,
&newport);
- mach_port_destroy (mach_task_self (), ref);
-+ mach_port_deallocate (mach_task_self (), ref);
++ mach_port_mod_refs (mach_task_self (), ref, MACH_PORT_RIGHT_RECEIVE, -1);
if (err)
{
if (must_reauth)