aboutsummaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'hurd')
-rw-r--r--hurd/Makefile13
-rw-r--r--hurd/hurdsig.c11
2 files changed, 11 insertions, 13 deletions
diff --git a/hurd/Makefile b/hurd/Makefile
index a42d148675..1dd66221d5 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -68,19 +68,6 @@ distribute += hurdmalloc.h
include ../mach/Machrules
include ../Rules
-# XXX sunrpc doesn't build yet for Hurd, but its headers are
-# crucial nontheless. So sysdeps/mach/hurd/Makefile elides sunrpc
-# from $(subdirs), and this rule arranges for the headers in question
-# to get installed.
-sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
- rpc_msg.h auth_unix.h clnt.h
-installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
- $(sunrpc-headers))
-install-headers-nosubdir: $(installed-sunrpc-headers)
-$(installed-sunrpc-headers): $(inst_includedir)/%: $(..)sunrpc/%
- $(do-install)
-
-
# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
# stubs import <hurd/signal.h> and #define __mach_msg to
# _hurd_intr_rpc_mach_msg.
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 81c109c08b..0c8ed14eb8 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -22,6 +22,7 @@
#include <hurd/signal.h>
#include <cthreads.h> /* For `struct mutex'. */
#include <string.h>
+#include <hurd/id.h>
#include "hurdfault.h"
#include "hurdmalloc.h" /* XXX */
@@ -1239,6 +1240,16 @@ reauth_proc (mach_port_t new)
__mach_port_deallocate (__mach_task_self (), ignore);
__mach_port_destroy (__mach_task_self (), ref);
+ /* Set the owner of the process here too. */
+ mutex_lock (&_hurd_id.lock);
+ if (!_hurd_check_ids ())
+ HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC],
+ __proc_setowner (port,
+ (_hurd_id.gen.nuids
+ ? _hurd_id.gen.uids[0] : 0),
+ !_hurd_id.gen.nuids));
+ mutex_unlock (&_hurd_id.lock);
+
(void) &reauth_proc; /* Silence compiler warning. */
}
text_set_element (_hurd_reauth_hook, reauth_proc);