Include <hurd/id.h>.
authordrepper <drepper>
Sun, 6 Jul 1997 21:39:27 +0000 (21:39 +0000)
committerdrepper <drepper>
Sun, 6 Jul 1997 21:39:27 +0000 (21:39 +0000)
(reauth_proc): Call proc_setowner appropriately too.

hurd/hurdsig.c

index 81c109c..0c8ed14 100644 (file)
@@ -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);