diff options
-rw-r--r-- | debian/patches/dde-protected-payloads.patch | 726 |
1 files changed, 726 insertions, 0 deletions
diff --git a/debian/patches/dde-protected-payloads.patch b/debian/patches/dde-protected-payloads.patch index d85f88c7..58fbe8fc 100644 --- a/debian/patches/dde-protected-payloads.patch +++ b/debian/patches/dde-protected-payloads.patch @@ -1,3 +1,47 @@ +diff --git a/devnode/Makefile b/devnode/Makefile +index d9a9c23..9529fa7 100644 +--- a/devnode/Makefile ++++ b/devnode/Makefile +@@ -24,6 +24,7 @@ HURDLIBS = ports trivfs fshelp shouldbeinlibc + target = devnode + MIGSTUBS = deviceServer.o notifyServer.o + MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h ++device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" + OBJS = $(SRCS:.c=.o) $(MIGSTUBS) + + include ../Makeconf +diff --git a/devnode/devnode.c b/devnode/devnode.c +index 789bf51..f9f0359 100644 +--- a/devnode/devnode.c ++++ b/devnode/devnode.c +@@ -138,27 +138,6 @@ do_mach_notify_dead_name (struct port_info *pi, + } + + /* Implementation of device interface */ +-kern_return_t +-ds_xxx_device_set_status (device_t device, dev_flavor_t flavor, +- dev_status_t status, size_t statu_cnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_get_status (device_t device, dev_flavor_t flavor, +- dev_status_t status, size_t *statuscnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_set_filter (device_t device, mach_port_t rec, +- int pri, filter_array_t filt, size_t len) +-{ +- return D_INVALID_OPERATION; +-} +- + kern_return_t + ds_device_open (mach_port_t master_port, mach_port_t reply_port, + mach_msg_type_name_t reply_portPoly, diff --git a/devnode/mig-mutate.h b/devnode/mig-mutate.h index f692236..0656014 100644 --- a/devnode/mig-mutate.h @@ -11,6 +55,70 @@ index f692236..0656014 100644 #define NOTIFY_DESTRUCTOR \ end_using_port_info (port_info_t) #define NOTIFY_IMPORTS \ +diff --git a/eth-filter.multi-thread/filter.c b/eth-filter.multi-thread/filter.c +index ec3efe9..5a6d589 100644 +--- a/eth-filter.multi-thread/filter.c ++++ b/eth-filter.multi-thread/filter.c +@@ -315,27 +315,6 @@ do_mach_notify_dead_name (mach_port_t notify, + } + + /* Implementation of device interface */ +-kern_return_t +-ds_xxx_device_set_status (device_t device, dev_flavor_t flavor, +- dev_status_t status, size_t statu_cnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_get_status (device_t device, dev_flavor_t flavor, +- dev_status_t status, size_t *statuscnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_set_filter (device_t device, mach_port_t rec, +- int pri, filter_array_t filt, size_t len) +-{ +- return D_INVALID_OPERATION; +-} +- + kern_return_t + ds_device_open (mach_port_t master_port, mach_port_t reply_port, + mach_msg_type_name_t reply_portPoly, +diff --git a/eth-filter/filter.c b/eth-filter/filter.c +index 482b080..13dd03b 100644 +--- a/eth-filter/filter.c ++++ b/eth-filter/filter.c +@@ -294,27 +294,6 @@ do_mach_notify_dead_name (struct port_info *pi, + } + + /* Implementation of device interface */ +-kern_return_t +-ds_xxx_device_set_status (struct proxy_user *device, dev_flavor_t flavor, +- dev_status_t status, size_t statu_cnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_get_status (struct proxy_user *device, dev_flavor_t flavor, +- dev_status_t status, size_t *statuscnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_set_filter (struct proxy_user *device, mach_port_t rec, +- int pri, filter_array_t filt, size_t len) +-{ +- return D_INVALID_OPERATION; +-} +- + kern_return_t + ds_device_open (mach_port_t master_port, mach_port_t reply_port, + mach_msg_type_name_t reply_portPoly, diff --git a/eth-filter/mig-decls.h b/eth-filter/mig-decls.h index 0bb29a6..a3f700c 100644 --- a/eth-filter/mig-decls.h @@ -50,6 +158,397 @@ index 388ce09..5c6cde9 100644 #define DEVICE_DESTRUCTOR \ end_using_device (proxy_user_t) #define DEVICE_IMPORTS \ +diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile +index fbee1ca..bfd065a 100644 +--- a/eth-multiplexer/Makefile ++++ b/eth-multiplexer/Makefile +@@ -23,6 +23,7 @@ target = eth-multiplexer + SRCS = ethernet.c vdev.c multiplexer.c dev_stat.c netfs_impl.c notify_impl.c device_impl.c demuxer.c + MIGSTUBS = deviceServer.o notifyServer.o + MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h ++device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" + OBJS = $(SRCS:.c=.o) $(MIGSTUBS) + LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h + HURDLIBS=ports fshelp shouldbeinlibc netfs bpf +diff --git a/eth-multiplexer/device.h b/eth-multiplexer/device.h +deleted file mode 100644 +index db0798d..0000000 +--- a/eth-multiplexer/device.h ++++ /dev/null +@@ -1,336 +0,0 @@ +-#ifndef _device_user_ +-#define _device_user_ +- +-/* Module device */ +- +-#include <mach/kern_return.h> +-#include <mach/port.h> +-#include <mach/message.h> +- +-#include <mach/std_types.h> +-#include <mach/mach_types.h> +-#include <device/device_types.h> +-#include <device/net_status.h> +- +-/* Routine device_open */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_open +-#if defined(LINTLIBRARY) +- (master_port, mode, name, device) +- mach_port_t master_port; +- dev_mode_t mode; +- dev_name_t name; +- mach_port_t *device; +-{ return device_open(master_port, mode, name, device); } +-#else +-( +- mach_port_t master_port, +- dev_mode_t mode, +- dev_name_t name, +- mach_port_t *device +-); +-#endif +- +-/* Routine device_close */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_close +-#if defined(LINTLIBRARY) +- (device) +- mach_port_t device; +-{ return device_close(device); } +-#else +-( +- mach_port_t device +-); +-#endif +- +-/* Routine device_write */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_write +-#if defined(LINTLIBRARY) +- (device, mode, recnum, data, dataCnt, bytes_written) +- mach_port_t device; +- dev_mode_t mode; +- recnum_t recnum; +- io_buf_ptr_t data; +- mach_msg_type_number_t dataCnt; +- int *bytes_written; +-{ return device_write(device, mode, recnum, data, dataCnt, bytes_written); } +-#else +-( +- mach_port_t device, +- dev_mode_t mode, +- recnum_t recnum, +- io_buf_ptr_t data, +- mach_msg_type_number_t dataCnt, +- int *bytes_written +-); +-#endif +- +-/* Routine device_write_inband */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_write_inband +-#if defined(LINTLIBRARY) +- (device, mode, recnum, data, dataCnt, bytes_written) +- mach_port_t device; +- dev_mode_t mode; +- recnum_t recnum; +- io_buf_ptr_inband_t data; +- mach_msg_type_number_t dataCnt; +- int *bytes_written; +-{ return device_write_inband(device, mode, recnum, data, dataCnt, bytes_written); } +-#else +-( +- mach_port_t device, +- dev_mode_t mode, +- recnum_t recnum, +- io_buf_ptr_inband_t data, +- mach_msg_type_number_t dataCnt, +- int *bytes_written +-); +-#endif +- +-/* Routine device_read */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_read +-#if defined(LINTLIBRARY) +- (device, mode, recnum, bytes_wanted, data, dataCnt) +- mach_port_t device; +- dev_mode_t mode; +- recnum_t recnum; +- int bytes_wanted; +- io_buf_ptr_t *data; +- mach_msg_type_number_t *dataCnt; +-{ return device_read(device, mode, recnum, bytes_wanted, data, dataCnt); } +-#else +-( +- mach_port_t device, +- dev_mode_t mode, +- recnum_t recnum, +- int bytes_wanted, +- io_buf_ptr_t *data, +- mach_msg_type_number_t *dataCnt +-); +-#endif +- +-/* Routine device_read_inband */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_read_inband +-#if defined(LINTLIBRARY) +- (device, mode, recnum, bytes_wanted, data, dataCnt) +- mach_port_t device; +- dev_mode_t mode; +- recnum_t recnum; +- int bytes_wanted; +- io_buf_ptr_inband_t data; +- mach_msg_type_number_t *dataCnt; +-{ return device_read_inband(device, mode, recnum, bytes_wanted, data, dataCnt); } +-#else +-( +- mach_port_t device, +- dev_mode_t mode, +- recnum_t recnum, +- int bytes_wanted, +- io_buf_ptr_inband_t data, +- mach_msg_type_number_t *dataCnt +-); +-#endif +- +-/* Routine xxx_device_set_status */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t xxx_device_set_status +-#if defined(LINTLIBRARY) +- (device, flavor, status, statusCnt) +- mach_port_t device; +- dev_flavor_t flavor; +- dev_status_t status; +- mach_msg_type_number_t statusCnt; +-{ return xxx_device_set_status(device, flavor, status, statusCnt); } +-#else +-( +- mach_port_t device, +- dev_flavor_t flavor, +- dev_status_t status, +- mach_msg_type_number_t statusCnt +-); +-#endif +- +-/* Routine xxx_device_get_status */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t xxx_device_get_status +-#if defined(LINTLIBRARY) +- (device, flavor, status, statusCnt) +- mach_port_t device; +- dev_flavor_t flavor; +- dev_status_t status; +- mach_msg_type_number_t *statusCnt; +-{ return xxx_device_get_status(device, flavor, status, statusCnt); } +-#else +-( +- mach_port_t device, +- dev_flavor_t flavor, +- dev_status_t status, +- mach_msg_type_number_t *statusCnt +-); +-#endif +- +-/* Routine xxx_device_set_filter */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t xxx_device_set_filter +-#if defined(LINTLIBRARY) +- (device, receive_port, receive_portPoly, priority, filter, filterCnt) +- mach_port_t device; +- mach_port_t receive_port; +- mach_msg_type_name_t receive_portPoly; +- int priority; +- filter_array_t filter; +- mach_msg_type_number_t filterCnt; +-{ return xxx_device_set_filter(device, receive_port, receive_portPoly, priority, filter, filterCnt); } +-#else +-( +- mach_port_t device, +- mach_port_t receive_port, +- mach_msg_type_name_t receive_portPoly, +- int priority, +- filter_array_t filter, +- mach_msg_type_number_t filterCnt +-); +-#endif +- +-/* Routine device_map */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_map +-#if defined(LINTLIBRARY) +- (device, prot, offset, size, pager, unmap) +- mach_port_t device; +- vm_prot_t prot; +- vm_offset_t offset; +- vm_size_t size; +- mach_port_t *pager; +- int unmap; +-{ return device_map(device, prot, offset, size, pager, unmap); } +-#else +-( +- mach_port_t device, +- vm_prot_t prot, +- vm_offset_t offset, +- vm_size_t size, +- mach_port_t *pager, +- int unmap +-); +-#endif +- +-/* Routine device_set_status */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_set_status +-#if defined(LINTLIBRARY) +- (device, flavor, status, statusCnt) +- mach_port_t device; +- dev_flavor_t flavor; +- dev_status_t status; +- mach_msg_type_number_t statusCnt; +-{ return device_set_status(device, flavor, status, statusCnt); } +-#else +-( +- mach_port_t device, +- dev_flavor_t flavor, +- dev_status_t status, +- mach_msg_type_number_t statusCnt +-); +-#endif +- +-/* Routine device_get_status */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_get_status +-#if defined(LINTLIBRARY) +- (device, flavor, status, statusCnt) +- mach_port_t device; +- dev_flavor_t flavor; +- dev_status_t status; +- mach_msg_type_number_t *statusCnt; +-{ return device_get_status(device, flavor, status, statusCnt); } +-#else +-( +- mach_port_t device, +- dev_flavor_t flavor, +- dev_status_t status, +- mach_msg_type_number_t *statusCnt +-); +-#endif +- +-/* Routine device_set_filter */ +-#ifdef mig_external +-mig_external +-#else +-extern +-#endif +-kern_return_t device_set_filter +-#if defined(LINTLIBRARY) +- (device, receive_port, receive_portPoly, priority, filter, filterCnt) +- mach_port_t device; +- mach_port_t receive_port; +- mach_msg_type_name_t receive_portPoly; +- int priority; +- filter_array_t filter; +- mach_msg_type_number_t filterCnt; +-{ return device_set_filter(device, receive_port, receive_portPoly, priority, filter, filterCnt); } +-#else +-( +- mach_port_t device, +- mach_port_t receive_port, +- mach_msg_type_name_t receive_portPoly, +- int priority, +- filter_array_t filter, +- mach_msg_type_number_t filterCnt +-); +-#endif +- +-#endif /* not defined(_device_user_) */ +diff --git a/eth-multiplexer/device_impl.c b/eth-multiplexer/device_impl.c +index 35a4da4..7d82b8d 100644 +--- a/eth-multiplexer/device_impl.c ++++ b/eth-multiplexer/device_impl.c +@@ -39,32 +39,6 @@ extern struct port_class *other_portclass; + extern struct port_info *notify_pi; + + /* Implementation of device interface */ +-kern_return_t +-ds_xxx_device_set_status (struct vether_device *vdev, dev_flavor_t flavor, +- dev_status_t status, size_t statu_cnt) +-{ +- if (vdev == NULL) +- return D_NO_SUCH_DEVICE; +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_get_status (struct vether_device *vdev, dev_flavor_t flavor, +- dev_status_t status, size_t *statuscnt) +-{ +- if (vdev == NULL) +- return D_NO_SUCH_DEVICE; +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_set_filter (struct vether_device *vdev, mach_port_t rec, +- int pri, filter_array_t filt, size_t len) +-{ +- if (vdev == NULL) +- return D_NO_SUCH_DEVICE; +- return D_INVALID_OPERATION; +-} + + /* + * This function is currently running in the multithread environment, diff --git a/eth-multiplexer/mig-decls.h b/eth-multiplexer/mig-decls.h index a68e2ec..6ad9ebf 100644 --- a/eth-multiplexer/mig-decls.h @@ -89,6 +588,233 @@ index 2403c29..55eca31 100644 #define DEVICE_DESTRUCTOR \ end_using_device (vether_device_t) #define DEVICE_IMPORTS \ +diff --git a/libmachdev/device.defs b/libmachdev/device.defs +deleted file mode 100644 +index 5c16a37..0000000 +--- a/libmachdev/device.defs ++++ /dev/null +@@ -1,175 +0,0 @@ +-/* +- * Mach Operating System +- * Copyright (c) 1991,1990,1989 Carnegie Mellon University +- * All Rights Reserved. +- * +- * Permission to use, copy, modify and distribute this software and its +- * documentation is hereby granted, provided that both the copyright +- * notice and this permission notice appear in all copies of the +- * software, derivative works or modified versions, and any portions +- * thereof, and that both notices appear in supporting documentation. +- * +- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" +- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR +- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. +- * +- * Carnegie Mellon requests users of this software to return to +- * +- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU +- * School of Computer Science +- * Carnegie Mellon University +- * Pittsburgh PA 15213-3890 +- * +- * any improvements or extensions that they make and grant Carnegie Mellon +- * the rights to redistribute these changes. +- */ +-/* +- * File: device/device.defs +- * Author: Douglas Orr +- * Feb 10, 1988 +- * Abstract: +- * Mach device support. Mach devices are accessed through +- * block and character device interfaces to the kernel. +- */ +- +-#ifdef MACH_KERNEL +-simport <kern/compat_xxx_defs.h>; /* for obsolete routines */ +-#endif +- +-subsystem +-#if KERNEL_SERVER +- KernelServer +-#endif +- device 2800; +- +-#include <mach/std_types.defs> +-#include <mach/mach_types.defs> +-#include <device/device_types.defs> +- +-serverprefix ds_; +- +-type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic +- ctype: mach_port_t; +- +-routine device_open( +- master_port : mach_port_t; +- sreplyport reply_port : reply_port_t; +- mode : dev_mode_t; +- name : dev_name_t; +- out device : device_t = +- MACH_MSG_TYPE_PORT_SEND +- ctype: mach_port_t +-#if KERNEL_SERVER +- outtran: mach_port_t convert_device_to_port(device_t) +-#else +-#ifdef DEVICE_OUTTRAN +- outtran: DEVICE_OUTTRAN +-#endif +-#endif /* KERNEL_SERVER */ +- ); +- +-routine device_close( +- device : device_t +- ); +- +-routine device_write( +- device : device_t; +- sreplyport reply_port : reply_port_t; +- in mode : dev_mode_t; +- in recnum : recnum_t; +- in data : io_buf_ptr_t; +- out bytes_written : int +- ); +- +-routine device_write_inband( +- device : device_t; +- sreplyport reply_port : reply_port_t; +- in mode : dev_mode_t; +- in recnum : recnum_t; +- in data : io_buf_ptr_inband_t; +- out bytes_written : int +- ); +- +-routine device_read( +- device : device_t; +- sreplyport reply_port : reply_port_t; +- in mode : dev_mode_t; +- in recnum : recnum_t; +- in bytes_wanted : int; +- out data : io_buf_ptr_t +- ); +- +-routine device_read_inband( +- device : device_t; +- sreplyport reply_port : reply_port_t; +- in mode : dev_mode_t; +- in recnum : recnum_t; +- in bytes_wanted : int; +- out data : io_buf_ptr_inband_t +- ); +- +-/* obsolete */ +-routine xxx_device_set_status( +- device : device_t; +- in flavor : dev_flavor_t; +- in status : dev_status_t, IsLong +- ); +- +-/* obsolete */ +-routine xxx_device_get_status( +- device : device_t; +- in flavor : dev_flavor_t; +- out status : dev_status_t, IsLong +- ); +- +-/* obsolete */ +-routine xxx_device_set_filter( +- device : device_t; +- in receive_port : mach_port_send_t; +- in priority : int; +- in filter : filter_array_t, IsLong +- ); +- +-routine device_map( +- device : device_t; +- in prot : vm_prot_t; +- in offset : vm_offset_t; +- in size : vm_size_t; +- out pager : memory_object_t; +- in unmap : int +- ); +- +-routine device_set_status( +- device : device_t; +- in flavor : dev_flavor_t; +- in status : dev_status_t +- ); +- +-routine device_get_status( +- device : device_t; +- in flavor : dev_flavor_t; +- out status : dev_status_t, CountInOut +- ); +- +-routine device_set_filter( +- device : device_t; +- in receive_port : mach_port_send_t; +- in priority : int; +- in filter : filter_array_t +- ); +- +-routine device_intr_register( +- master_port : mach_port_t; +- in line : int; +- in id : int; +- in flags : int; +- in receive_port : mach_port_send_t +- ); +- +-/* +- * enable/disable the specified line. +- */ +-routine device_intr_enable( +- master_port : mach_port_t; +- line : int; +- status : char); +diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c +index 6bd5a12..5287bf4 100644 +--- a/libmachdev/ds_routines.c ++++ b/libmachdev/ds_routines.c +@@ -98,41 +98,6 @@ mach_convert_device_to_port (mach_device_t device) + } + + /* Implementation of device interface */ +-kern_return_t +-ds_xxx_device_set_status (struct mach_device *device, dev_flavor_t flavor, +- dev_status_t status, size_t statu_cnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_get_status (struct mach_device *device, dev_flavor_t flavor, +- dev_status_t status, size_t *statuscnt) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_xxx_device_set_filter (struct mach_device *device, mach_port_t rec, +- int pri, filter_array_t filt, size_t len) +-{ +- return D_INVALID_OPERATION; +-} +- +-io_return_t +-ds_device_intr_register (mach_port_t master_port, int irq, +- int flags, int id, mach_port_t receive_port) +-{ +- return D_INVALID_OPERATION; +-} +- +-kern_return_t +-ds_device_intr_enable (mach_port_t master_port, +- int line, char status) +-{ +- return D_INVALID_OPERATION; +-} +- + io_return_t + ds_device_open (mach_port_t open_port, mach_port_t reply_port, + mach_msg_type_name_t reply_port_type, dev_mode_t mode, diff --git a/libmachdev/mig-decls.h b/libmachdev/mig-decls.h index b3dc43d..8302029 100644 --- a/libmachdev/mig-decls.h |