summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-08-05 23:36:21 +0000
committerUlrich Drepper <drepper@redhat.com>1997-08-05 23:36:21 +0000
commit044b16f4e9ae773187f4fee8a9a0a54f9a51f13f (patch)
tree58bc41e16535e0d0f61d51e6af15ce4128864fc9 /hurd
parentc59a94711c6a9d38811b828863076f39000831b4 (diff)
update for 2.0.5pre1
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdsig.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index f50daa2f8f..f028afc533 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 */
@@ -1237,6 +1238,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);