diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/diskfs-fix-fsys-receiver-lookups.patch | 150 | ||||
-rw-r--r-- | debian/patches/netfs-fix-fsys-receiver-lookups.patch | 48 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 104 insertions, 96 deletions
diff --git a/debian/patches/diskfs-fix-fsys-receiver-lookups.patch b/debian/patches/diskfs-fix-fsys-receiver-lookups.patch index 87397c8e..5c041c94 100644 --- a/debian/patches/diskfs-fix-fsys-receiver-lookups.patch +++ b/debian/patches/diskfs-fix-fsys-receiver-lookups.patch @@ -1,13 +1,52 @@ +commit 03cacc273cba8a1b2e5677808f7d1f76280fae9d +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Tue Feb 11 19:03:26 2014 +0100 + + libdiskfs: fix typo + + * libdiskfs/boot-start.c (diskfs_S_fsys_init): Fix typo. + diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c -index 6d9a773..10bd2ee 100644 +index 6d9a773..05d3b43 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c -@@ -426,17 +426,17 @@ diskfs_execboot_fsys_startup (mach_port_t port, int flags, +@@ -460,7 +460,7 @@ diskfs_S_fsys_init (mach_port_t port, + mach_port_t procserver, + mach_port_t authhandle) + { +- struct port_infe *pt; ++ struct port_info *pt; + static int initdone = 0; + mach_port_t host, startup; + error_t err; +commit 7e43d4030786ee13e791ad944c93256054e5f34b +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed Jan 29 14:06:15 2014 +0100 + + libdiskfs: fix receiver lookups in fsys server functions + + * libdiskfs/diskfs.h (struct diskfs_control): New declaration. + (diskfs_begin_using_control_port): New declaration and function. + (diskfs_end_using_control_port): Likewise. + * libdiskfs/fsmutations.h: Add translation functions. + * libdiskfs/priv.h (control_t): New type declaration for mig. + * libdiskfs/boot-start.c: Fix receiver lookups. + * libdiskfs/fsys-getfile.c: Likewise. + * libdiskfs/fsys-getroot.c: Likewise. + * libdiskfs/fsys-goaway.c: Likewise. + * libdiskfs/fsys-options.c: Likewise. + * libdiskfs/fsys-syncfs.c: Likewise. + +diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c +index 05d3b43..7b8a84f 100644 +--- a/libdiskfs/boot-start.c ++++ b/libdiskfs/boot-start.c +@@ -426,17 +426,16 @@ diskfs_execboot_fsys_startup (mach_port_t port, int flags, /* Called by init to get the privileged ports as described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_getpriv (mach_port_t port, -+diskfs_S_fsys_getpriv (control_t init_bootstrap_port, ++diskfs_S_fsys_getpriv (struct diskfs_control *init_bootstrap_port, mach_port_t reply, mach_msg_type_name_t reply_type, mach_port_t *host_priv, mach_msg_type_name_t *hp_type, mach_port_t *dev_master, mach_msg_type_name_t *dm_type, @@ -19,12 +58,11 @@ index 6d9a773..10bd2ee 100644 - if (!init_bootstrap_port) + if (!init_bootstrap_port -+ || init_bootstrap_port->pi.bucket != diskfs_port_bucket + || init_bootstrap_port->pi.class != diskfs_initboot_class) return EOPNOTSUPP; err = get_privileged_ports (host_priv, dev_master); -@@ -447,20 +447,17 @@ diskfs_S_fsys_getpriv (mach_port_t port, +@@ -447,20 +446,17 @@ diskfs_S_fsys_getpriv (mach_port_t port, *task_type = MACH_MSG_TYPE_COPY_SEND; } @@ -37,24 +75,22 @@ index 6d9a773..10bd2ee 100644 described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_init (mach_port_t port, -+diskfs_S_fsys_init (control_t pt, ++diskfs_S_fsys_init (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, mach_port_t procserver, mach_port_t authhandle) { -- struct port_infe *pt; +- struct port_info *pt; static int initdone = 0; mach_port_t host, startup; error_t err; -@@ -468,10 +465,12 @@ diskfs_S_fsys_init (mach_port_t port, +@@ -468,10 +464,10 @@ diskfs_S_fsys_init (mach_port_t port, struct protid *rootpi; struct peropen *rootpo; - pt = ports_lookup_port (diskfs_port_bucket, port, diskfs_initboot_class); - if (!pt) -+ + if (!pt -+ || pt->pi.bucket != diskfs_port_bucket + || pt->pi.class != diskfs_initboot_class) return EOPNOTSUPP; - ports_port_deref (pt); @@ -63,14 +99,13 @@ index 6d9a773..10bd2ee 100644 return EOPNOTSUPP; initdone = 1; diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h -index db6a1d8..19859ac 100644 +index db6a1d8..359b11b 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h -@@ -121,6 +121,12 @@ struct node +@@ -121,6 +121,11 @@ struct node int author_tracks_uid; }; -+/* XXX */ +struct diskfs_control +{ + struct port_info pi; @@ -79,7 +114,7 @@ index db6a1d8..19859ac 100644 /* Possibly lookup types for diskfs_lookup call */ enum lookup_type { -@@ -795,8 +801,10 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred); +@@ -795,8 +800,10 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred); void diskfs_finish_protid (struct protid *cred, struct iouser *user); extern struct protid * diskfs_begin_using_protid_port (file_t port); @@ -90,7 +125,7 @@ index db6a1d8..19859ac 100644 #if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) -@@ -809,6 +817,13 @@ diskfs_begin_using_protid_port (file_t port) +@@ -809,6 +816,13 @@ diskfs_begin_using_protid_port (file_t port) return ports_lookup_port (diskfs_port_bucket, port, diskfs_protid_class); } @@ -98,13 +133,13 @@ index db6a1d8..19859ac 100644 +DISKFS_EXTERN_INLINE struct diskfs_control * +diskfs_begin_using_control_port (fsys_t port) +{ -+ return ports_lookup_port (diskfs_port_bucket, port, diskfs_control_class); ++ return ports_lookup_port (diskfs_port_bucket, port, NULL); +} + /* Called by MiG after server routines have been run; this balances begin_using_protid_port, and is arranged for the io and fs interfaces by fsmutations.h. */ -@@ -819,6 +834,14 @@ diskfs_end_using_protid_port (struct protid *cred) +@@ -819,6 +833,14 @@ diskfs_end_using_protid_port (struct protid *cred) ports_port_deref (cred); } @@ -134,7 +169,7 @@ index 5026810..68b6ae3 100644 #define IO_IMPORTS import "priv.h"; #define FSYS_IMPORTS import "priv.h"; diff --git a/libdiskfs/fsys-getfile.c b/libdiskfs/fsys-getfile.c -index 2fe9495..374033f 100644 +index 2fe9495..9dd5d73 100644 --- a/libdiskfs/fsys-getfile.c +++ b/libdiskfs/fsys-getfile.c @@ -27,7 +27,7 @@ @@ -142,11 +177,11 @@ index 2fe9495..374033f 100644 handle HANDLE & HANDLE_LEN. */ error_t -diskfs_S_fsys_getfile (mach_port_t fsys, -+diskfs_S_fsys_getfile (control_t pt, ++diskfs_S_fsys_getfile (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t reply_type, uid_t *uids, mach_msg_type_number_t nuids, gid_t *gids, mach_msg_type_number_t ngids, -@@ -41,15 +41,14 @@ diskfs_S_fsys_getfile (mach_port_t fsys, +@@ -41,15 +41,13 @@ diskfs_S_fsys_getfile (mach_port_t fsys, struct protid *new_cred; struct peropen *new_po; struct iouser *user; @@ -155,7 +190,6 @@ index 2fe9495..374033f 100644 - if (!pt) + if (!pt -+ || pt->pi.bucket != diskfs_port_bucket + || pt->pi.class != diskfs_control_class) return EOPNOTSUPP; @@ -165,7 +199,7 @@ index 2fe9495..374033f 100644 return EINVAL; } -@@ -58,14 +57,12 @@ diskfs_S_fsys_getfile (mach_port_t fsys, +@@ -58,14 +56,12 @@ diskfs_S_fsys_getfile (mach_port_t fsys, err = diskfs_cached_lookup (f->data.cache_id, &node); if (err) { @@ -180,7 +214,7 @@ index 2fe9495..374033f 100644 return ESTALE; } -@@ -73,7 +70,6 @@ diskfs_S_fsys_getfile (mach_port_t fsys, +@@ -73,7 +69,6 @@ diskfs_S_fsys_getfile (mach_port_t fsys, if (err) { diskfs_nput (node); @@ -188,7 +222,7 @@ index 2fe9495..374033f 100644 return err; } -@@ -98,7 +94,6 @@ diskfs_S_fsys_getfile (mach_port_t fsys, +@@ -98,7 +93,6 @@ diskfs_S_fsys_getfile (mach_port_t fsys, iohelp_free_iouser (user); diskfs_nput (node); @@ -197,7 +231,7 @@ index 2fe9495..374033f 100644 if (! err) { diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c -index 85e1167..bae2582 100644 +index 85e1167..5212214 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -26,7 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -205,7 +239,7 @@ index 85e1167..bae2582 100644 /* Implement fsys_getroot as described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_getroot (fsys_t controlport, -+diskfs_S_fsys_getroot (control_t pt, ++diskfs_S_fsys_getroot (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, mach_port_t dotdot, @@ -218,18 +252,17 @@ index 85e1167..bae2582 100644 error_t err = 0; mode_t type; struct protid *newpi; -@@ -55,7 +53,9 @@ diskfs_S_fsys_getroot (fsys_t controlport, +@@ -55,7 +53,8 @@ diskfs_S_fsys_getroot (fsys_t controlport, path: NULL, }; - if (!pt) + if (!pt -+ || pt->pi.bucket != diskfs_port_bucket + || pt->pi.class != diskfs_control_class) return EOPNOTSUPP; flags &= O_HURD; -@@ -200,8 +200,6 @@ diskfs_S_fsys_getroot (fsys_t controlport, +@@ -200,8 +199,6 @@ diskfs_S_fsys_getroot (fsys_t controlport, pthread_mutex_unlock (&diskfs_root_node->lock); pthread_rwlock_unlock (&diskfs_fsys_lock); @@ -239,15 +272,15 @@ index 85e1167..bae2582 100644 return err; diff --git a/libdiskfs/fsys-goaway.c b/libdiskfs/fsys-goaway.c -index 2aabce8..b70c0e8 100644 +index 2aabce8..b910387 100644 --- a/libdiskfs/fsys-goaway.c +++ b/libdiskfs/fsys-goaway.c -@@ -25,16 +25,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +@@ -25,16 +25,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Implement fsys_goaway as described in <hurd/fsys.defs>. */ error_t -diskfs_S_fsys_goaway (fsys_t controlport, -+diskfs_S_fsys_goaway (control_t pt, ++diskfs_S_fsys_goaway (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t reply_type, int flags) @@ -258,12 +291,11 @@ index 2aabce8..b70c0e8 100644 - if (!pt) + if (!pt -+ || pt->pi.bucket != diskfs_port_bucket + || pt->pi.class != diskfs_control_class) return EOPNOTSUPP; /* XXX FSYS_GOAWAY_NOWAIT not implemented. */ -@@ -48,6 +48,5 @@ diskfs_S_fsys_goaway (fsys_t controlport, +@@ -48,6 +47,5 @@ diskfs_S_fsys_goaway (fsys_t controlport, exit (0); } @@ -271,15 +303,15 @@ index 2aabce8..b70c0e8 100644 return ret; } diff --git a/libdiskfs/fsys-options.c b/libdiskfs/fsys-options.c -index bb18319..771a9c4 100644 +index bb18319..b366d14 100644 --- a/libdiskfs/fsys-options.c +++ b/libdiskfs/fsys-options.c -@@ -28,15 +28,17 @@ +@@ -28,15 +28,13 @@ /* Implement fsys_set_options as described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_set_options (fsys_t fsys, -+diskfs_S_fsys_set_options (control_t pt, ++diskfs_S_fsys_set_options (struct diskfs_control *pt, mach_port_t reply, mach_msg_type_name_t replytype, char *data, mach_msg_type_number_t len, @@ -288,23 +320,19 @@ index bb18319..771a9c4 100644 error_t err = 0; - struct port_info *pt = - ports_lookup_port (diskfs_port_bucket, fsys, diskfs_control_class); -+ if (!pt -+ || pt->pi.bucket != diskfs_port_bucket -+ || pt->pi.class != diskfs_control_class) -+ return EOPNOTSUPP; error_t helper (struct node *np) -@@ -60,9 +62,6 @@ diskfs_S_fsys_set_options (fsys_t fsys, +@@ -60,7 +58,8 @@ diskfs_S_fsys_set_options (fsys_t fsys, return error; } - if (!pt) -- return EOPNOTSUPP; -- ++ if (!pt ++ || pt->pi.class != diskfs_control_class) + return EOPNOTSUPP; + if (do_children) - { - pthread_rwlock_wrlock (&diskfs_fsys_lock); @@ -77,13 +76,12 @@ diskfs_S_fsys_set_options (fsys_t fsys, pthread_rwlock_unlock (&diskfs_fsys_lock); } @@ -316,11 +344,11 @@ index bb18319..771a9c4 100644 /* Implement fsys_get_options as described in <hurd/fsys.defs>. */ error_t -diskfs_S_fsys_get_options (fsys_t fsys, -+diskfs_S_fsys_get_options (control_t port, ++diskfs_S_fsys_get_options (struct diskfs_control *port, mach_port_t reply, mach_msg_type_name_t replytype, char **data, mach_msg_type_number_t *data_len) -@@ -91,10 +89,10 @@ diskfs_S_fsys_get_options (fsys_t fsys, +@@ -91,10 +89,9 @@ diskfs_S_fsys_get_options (fsys_t fsys, char *argz = 0; size_t argz_len = 0; error_t err; @@ -329,12 +357,11 @@ index bb18319..771a9c4 100644 - if (!port) + if (!port -+ || port->pi.bucket != diskfs_port_bucket + || port->pi.class != diskfs_control_class) return EOPNOTSUPP; err = argz_add (&argz, &argz_len, program_invocation_name); -@@ -111,6 +109,5 @@ diskfs_S_fsys_get_options (fsys_t fsys, +@@ -111,6 +108,5 @@ diskfs_S_fsys_get_options (fsys_t fsys, else free (argz); @@ -342,15 +369,15 @@ index bb18319..771a9c4 100644 return err; } diff --git a/libdiskfs/fsys-syncfs.c b/libdiskfs/fsys-syncfs.c -index beb8881..f2a8cd7 100644 +index beb8881..4dceed7 100644 --- a/libdiskfs/fsys-syncfs.c +++ b/libdiskfs/fsys-syncfs.c -@@ -24,14 +24,17 @@ +@@ -24,14 +24,12 @@ /* Implement fsys_syncfs as described in <hurd/fsys.defs>. */ kern_return_t -diskfs_S_fsys_syncfs (fsys_t controlport, -+diskfs_S_fsys_syncfs (control_t pi, ++diskfs_S_fsys_syncfs (struct diskfs_control *pi, mach_port_t reply, mach_msg_type_name_t replytype, int wait, @@ -358,25 +385,20 @@ index beb8881..f2a8cd7 100644 { - struct port_info *pi = ports_lookup_port (diskfs_port_bucket, controlport, - diskfs_control_class); -+ if (!pi -+ || pi->pi.bucket != diskfs_port_bucket -+ || pi->pi.class != diskfs_control_class) -+ return EOPNOTSUPP; -+ error_t helper (struct node *np) { -@@ -49,9 +52,6 @@ diskfs_S_fsys_syncfs (fsys_t controlport, +@@ -49,7 +47,8 @@ diskfs_S_fsys_syncfs (fsys_t controlport, return 0; } - if (!pi) -- return EOPNOTSUPP; -- ++ if (!pi ++ || pi->pi.class != diskfs_control_class) + return EOPNOTSUPP; + pthread_rwlock_rdlock (&diskfs_fsys_lock); - - if (children) -@@ -67,8 +67,5 @@ diskfs_S_fsys_syncfs (fsys_t controlport, +@@ -67,8 +66,5 @@ diskfs_S_fsys_syncfs (fsys_t controlport, } pthread_rwlock_unlock (&diskfs_fsys_lock); diff --git a/debian/patches/netfs-fix-fsys-receiver-lookups.patch b/debian/patches/netfs-fix-fsys-receiver-lookups.patch index 54d06a09..8d72e458 100644 --- a/debian/patches/netfs-fix-fsys-receiver-lookups.patch +++ b/debian/patches/netfs-fix-fsys-receiver-lookups.patch @@ -1,4 +1,4 @@ -commit d9bcd42894027ae75e898d4a143c82f48f6c2eed +commit 300fc1b78311cf32dce548d9716ada4b961346c5 Author: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed Feb 12 11:24:14 2014 +0100 @@ -15,7 +15,7 @@ Date: Wed Feb 12 11:24:14 2014 +0100 * fsysstubs.c: Likewise. diff --git a/libnetfs/fsys-get-options.c b/libnetfs/fsys-get-options.c -index 54bd9a0..bc5be63 100644 +index 54bd9a0..836806b 100644 --- a/libnetfs/fsys-get-options.c +++ b/libnetfs/fsys-get-options.c @@ -31,7 +31,7 @@ @@ -27,21 +27,16 @@ index 54bd9a0..bc5be63 100644 mach_port_t reply, mach_msg_type_name_t reply_type, char **data, mach_msg_type_number_t *data_len) -@@ -39,10 +39,10 @@ netfs_S_fsys_get_options (fsys_t fsys, +@@ -39,8 +39,6 @@ netfs_S_fsys_get_options (fsys_t fsys, error_t err; char *argz = 0; size_t argz_len = 0; - struct port_info *port = - ports_lookup_port (netfs_port_bucket, fsys, netfs_control_class); -- if (!port) -+ if (!port -+ || port->pi.bucket != netfs_port_bucket -+ || port->pi.class != netfs_control_class) + if (!port) return EOPNOTSUPP; - - err = argz_add (&argz, &argz_len, program_invocation_name); -@@ -63,7 +63,5 @@ netfs_S_fsys_get_options (fsys_t fsys, +@@ -63,7 +61,5 @@ netfs_S_fsys_get_options (fsys_t fsys, else free (argz); @@ -50,7 +45,7 @@ index 54bd9a0..bc5be63 100644 return err; } diff --git a/libnetfs/fsys-getroot.c b/libnetfs/fsys-getroot.c -index 0d80111..fc774e1 100644 +index 0d80111..2d02120 100644 --- a/libnetfs/fsys-getroot.c +++ b/libnetfs/fsys-getroot.c @@ -25,7 +25,7 @@ @@ -71,24 +66,19 @@ index 0d80111..fc774e1 100644 struct iouser *cred; error_t err; struct protid *newpi; -@@ -49,9 +47,10 @@ netfs_S_fsys_getroot (mach_port_t cntl, - path: NULL, - }; +@@ -51,7 +49,6 @@ netfs_S_fsys_getroot (mach_port_t cntl, -- if (!pt) -+ if (!pt -+ || pt->pi.bucket != netfs_port_bucket -+ || pt->pi.class != netfs_control_class) + if (!pt) return EOPNOTSUPP; - ports_port_deref (pt); err = iohelp_create_complex_iouser (&cred, uids, nuids, gids, ngids); if (err) diff --git a/libnetfs/fsys-goaway.c b/libnetfs/fsys-goaway.c -index 0ac36d3..ec5db18 100644 +index 0ac36d3..872d073 100644 --- a/libnetfs/fsys-goaway.c +++ b/libnetfs/fsys-goaway.c -@@ -26,17 +26,17 @@ +@@ -26,17 +26,15 @@ #include <hurd/ports.h> error_t @@ -105,13 +95,11 @@ index 0ac36d3..ec5db18 100644 - netfs_control_class); - if (! pt) + -+ if (!pt -+ || pt->pi.bucket != netfs_port_bucket -+ || pt->pi.class != netfs_control_class) ++ if (!pt) return EOPNOTSUPP; err = netfs_shutdown (flags); -@@ -46,7 +46,5 @@ netfs_S_fsys_goaway (fsys_t control, +@@ -46,7 +44,5 @@ netfs_S_fsys_goaway (fsys_t control, exit (0); } @@ -120,10 +108,10 @@ index 0ac36d3..ec5db18 100644 return err; } diff --git a/libnetfs/fsys-set-options.c b/libnetfs/fsys-set-options.c -index d7dc743..c182ee2 100644 +index d7dc743..fb1c87e 100644 --- a/libnetfs/fsys-set-options.c +++ b/libnetfs/fsys-set-options.c -@@ -31,15 +31,17 @@ +@@ -31,15 +31,15 @@ /* Implement fsys_set_options as described in <hurd/fsys.defs>. */ error_t @@ -137,14 +125,12 @@ index d7dc743..c182ee2 100644 error_t err = 0; - struct port_info *pt = - ports_lookup_port (netfs_port_bucket, fsys, netfs_control_class); -+ if (!pt -+ || pt->pi.bucket != netfs_port_bucket -+ || pt->pi.class != netfs_control_class) ++ if (!pt) + return EOPNOTSUPP; error_t helper (struct node *np) -@@ -64,9 +66,6 @@ netfs_S_fsys_set_options (fsys_t fsys, +@@ -64,9 +64,6 @@ netfs_S_fsys_set_options (fsys_t fsys, return error; } @@ -154,7 +140,7 @@ index d7dc743..c182ee2 100644 #if NOT_YET if (do_children) { -@@ -87,7 +86,5 @@ netfs_S_fsys_set_options (fsys_t fsys, +@@ -87,7 +84,5 @@ netfs_S_fsys_set_options (fsys_t fsys, #endif } diff --git a/debian/patches/series b/debian/patches/series index f3a26d9d..0d0aaaea 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -46,5 +46,5 @@ newRPC.patch revert-remove-threadvars-hack.patch xkb-compat.patch fix-get-children-source.patch -#diskfs-fix-fsys-receiver-lookups.patch +diskfs-fix-fsys-receiver-lookups.patch netfs-fix-fsys-receiver-lookups.patch |