summaryrefslogtreecommitdiff
path: root/boot/boot.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-06-07 00:43:14 +0000
committerRoland McGrath <roland@gnu.org>1994-06-07 00:43:14 +0000
commit028329465035db0fda8de91dbedd1f09c2320f59 (patch)
tree04b836a12c9dc6c41b817d4587ba3417b48fb15a /boot/boot.c
parentd758426c7191c11372dd3ded0645fcdf6cd34155 (diff)
Formerly boot.c.~24~
Diffstat (limited to 'boot/boot.c')
-rw-r--r--boot/boot.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/boot/boot.c b/boot/boot.c
index b0e89651..7ff080b0 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -41,10 +41,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "term_S.h"
#include "tioctl_S.h"
+#include <hurd/auth.h>
+
mach_port_t privileged_host_port, master_device_port;
mach_port_t pseudo_master_device_port;
mach_port_t receive_set;
mach_port_t pseudo_console;
+auth_t authserver;
+
mach_port_t php_child_name, psmdp_child_name;
@@ -476,7 +480,11 @@ S_exec_init (
auth_t auth_handle,
process_t proc_server)
{
- return EOPNOTSUPP;
+ /* Kludgy way to get a port to the auth server. */
+ authserver = auth_handle;
+ if (proc_server != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), proc_server);
+ return 0;
}
kern_return_t
@@ -1167,7 +1175,26 @@ S_io_reauthenticate (mach_port_t object,
mach_msg_type_name_t reply_type,
int rendint)
{
- return EOPNOTSUPP;
+ uid_t *gu, *au;
+ gid_t *gg, *ag;
+ unsigned int gulen = 0, aulen = 0, gglen = 0, aglen = 0;
+
+ if (! auth_server_authenticate (authserver,
+ object, MACH_MSG_TYPE_MAKE_SEND,
+ rendint,
+ object, MACH_MSG_TYPE_MAKE_SEND,
+ &gu, &gulen,
+ &au, &aulen,
+ &gg, &gglen,
+ &ag, &aglen))
+ {
+ mig_deallocate (gu, gulen * sizeof *gu);
+ mig_deallocate (au, aulen * sizeof *gu);
+ mig_deallocate (gg, gglen * sizeof *gu);
+ mig_deallocate (au, aulen * sizeof *gu);
+ }
+
+ return 0;
}
kern_return_t