summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-01-20 10:46:01 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-01-20 10:46:01 +0100
commit6d2cfcd85c332945c1bf5672f4b8f3da90274b0b (patch)
tree0df2cb4516400141d170d0bb5f662a28adfb11af
parent4b0a0a19e16b56188a1f365fefcb2e19f9a59fc9 (diff)
update fix-receiver-lookups.patch
-rw-r--r--debian/patches/fix-receiver-lookups.patch110
1 files changed, 0 insertions, 110 deletions
diff --git a/debian/patches/fix-receiver-lookups.patch b/debian/patches/fix-receiver-lookups.patch
index adc9e974..1f18aa70 100644
--- a/debian/patches/fix-receiver-lookups.patch
+++ b/debian/patches/fix-receiver-lookups.patch
@@ -106,113 +106,3 @@ index e9c58f1..c910824 100644
replyport reply: mach_port_poly_t;
msgoption flags: integer_t;
thread: mach_port_t;
-diff --git a/trans/Makefile b/trans/Makefile
-index 291df2f..c0386d0 100644
---- a/trans/Makefile
-+++ b/trans/Makefile
-@@ -1,6 +1,6 @@
- #
- # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2006, 2007,
--# 2008 Free Software Foundation, Inc.
-+# 2008, 2013 Free Software Foundation, Inc.
- #
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License as
-@@ -32,6 +32,10 @@ OBJS = $(SRCS:.c=.o) fsysServer.o ifsockServer.o passwordServer.o \
- HURDLIBS = ports netfs trivfs iohelp fshelp pipe ihash shouldbeinlibc
- LDLIBS += -lpthread
- password-LDLIBS = $(LIBCRYPT)
-+password-MIGSFLAGS=\
-+ "-DIO_INTRAN=trivfs_protid_t trivfs_begin_using_protid (io_t)" \
-+ "-DIO_DESTRUCTOR=trivfs_end_using_protid (trivfs_protid_t)" \
-+ "-DPASSWORD_IMPORTS=import <hurd/trivfs.h>;"
-
- include ../Makeconf
-
-diff --git a/trans/password.c b/trans/password.c
-index 6f15a9e..344b78b 100644
---- a/trans/password.c
-+++ b/trans/password.c
-@@ -1,5 +1,5 @@
- /* Hurd standard password server.
-- Copyright (C) 1999 Free Software Foundation
-+ Copyright (C) 1999, 2013 Free Software Foundation
- Written by Mark Kettenis.
-
- The GNU Hurd is free software; you can redistribute it and/or
-@@ -135,10 +135,9 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
-
- /* Implement password_check_user as described in <hurd/password.defs>. */
- kern_return_t
--S_password_check_user (io_t server, uid_t user, char *pw,
-+S_password_check_user (struct trivfs_protid *cred, uid_t user, char *pw,
- mach_port_t *port, mach_msg_type_name_t *port_type)
- {
-- struct trivfs_protid *cred;
- struct ugids ugids = UGIDS_INIT;
- auth_t auth;
- error_t err;
-@@ -150,10 +149,16 @@ S_password_check_user (io_t server, uid_t user, char *pw,
- return strdup (pw);
- }
-
-- cred = ports_lookup_port (port_bucket, server, trivfs_protid_portclasses[0]);
- if (! cred)
- return EOPNOTSUPP;
-
-+ if (cred->pi.bucket != port_bucket ||
-+ cred->pi.class != trivfs_protid_portclasses[0])
-+ {
-+ ports_port_deref (cred);
-+ return EOPNOTSUPP;
-+ }
-+
- /* Verify password. */
- err = ugids_add_user (&ugids, user, 1);
- if (!err)
-@@ -173,17 +178,14 @@ S_password_check_user (io_t server, uid_t user, char *pw,
- }
-
- ugids_fini (&ugids);
--
-- ports_port_deref (cred);
- return err;
- }
-
- /* Implement password_check_group as described in <hurd/password.defs>. */
- kern_return_t
--S_password_check_group (io_t server, uid_t group, char *pw,
-+S_password_check_group (struct trivfs_protid *cred, uid_t group, char *pw,
- mach_port_t *port, mach_msg_type_name_t *port_type)
- {
-- struct trivfs_protid *cred;
- struct ugids ugids = UGIDS_INIT;
- auth_t auth;
- error_t err;
-@@ -195,10 +197,16 @@ S_password_check_group (io_t server, uid_t group, char *pw,
- return strdup (pw);
- }
-
-- cred = ports_lookup_port (port_bucket, server, trivfs_protid_portclasses[0]);
- if (! cred)
- return EOPNOTSUPP;
--
-+
-+ if (cred->pi.bucket != port_bucket ||
-+ cred->pi.class != trivfs_protid_portclasses[0])
-+ {
-+ ports_port_deref (cred);
-+ return EOPNOTSUPP;
-+ }
-+
- /* Verify password. */
- err = ugids_add_gid (&ugids, group, 1);
- if (!err)
-@@ -218,7 +226,5 @@ S_password_check_group (io_t server, uid_t group, char *pw,
- }
-
- ugids_fini (&ugids);
--
-- ports_port_deref (cred);
- return err;
- }