[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 29/37: auth: remove implicit assumption about the bootstrap proce
From: |
Samuel Thibault |
Subject: |
[hurd] 29/37: auth: remove implicit assumption about the bootstrap process |
Date: |
Mon, 09 Feb 2015 09:59:11 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to annotated tag upstream/hurd/0.5.git20150208
in repository hurd.
commit 40b354e4cc67f1fedf9d4c2ce8d050a9ac68a643
Author: Justus Winter <address@hidden>
Date: Wed Jan 7 16:00:06 2015 +0100
auth: remove implicit assumption about the bootstrap process
The current code assumes that it can speak the startup protocol over
its bootstrap port.
* auth/auth.c (main): Generalize by trying to use `/servers/startup'
before falling back to the bootstrap port.
---
auth/auth.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/auth/auth.c b/auth/auth.c
index a7a188a..d5ef587 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -25,6 +25,7 @@
#include <pthread.h>
#include <hurd.h>
#include <hurd/startup.h>
+#include <hurd/paths.h>
#include <hurd/ports.h>
#include <hurd/ihash.h>
#include <idvec.h>
@@ -482,6 +483,7 @@ main (int argc, char **argv)
{
error_t err;
mach_port_t boot;
+ mach_port_t startup;
process_t proc;
mach_port_t hostpriv, masterdev;
struct authhandle *firstauth;
@@ -518,10 +520,21 @@ main (int argc, char **argv)
_hurd_port_set (&_hurd_ports[INIT_PORT_PROC], proc);
_hurd_proc_init (argv, NULL, 0);
+ startup = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (! MACH_PORT_VALID (startup))
+ {
+ error (0, errno, "%s", _SERVERS_STARTUP);
+ /* Fall back to using the bootstrap port as before. */
+ startup = boot;
+ }
+
/* Init knows intimately that we will be ready for messages
as soon as this returns. */
- startup_essential_task (boot, mach_task_self (), MACH_PORT_NULL, "auth",
+ startup_essential_task (startup, mach_task_self (), MACH_PORT_NULL, "auth",
hostpriv);
+
+ if (startup != boot)
+ mach_port_deallocate (mach_task_self (), startup);
mach_port_deallocate (mach_task_self (), boot);
mach_port_deallocate (mach_task_self (), hostpriv);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 34/37: Allow dhcp trafic and configuration, (continued)
- [hurd] 34/37: Allow dhcp trafic and configuration, Samuel Thibault, 2015/02/09
- [hurd] 01/37: Makeconf: handle the task_notify protocol, Samuel Thibault, 2015/02/09
- [hurd] 02/37: proc: register for new task notifications, Samuel Thibault, 2015/02/09
- [hurd] 07/37: ext2fs: tune the size of the inode cache, Samuel Thibault, 2015/02/09
- [hurd] 26/37: libports: silence pointless error message, Samuel Thibault, 2015/02/09
- [hurd] 12/37: Avoid ./ components in mtab output, Samuel Thibault, 2015/02/09
- [hurd] 10/37: Fix inclusion loop between hurd_types.defs and hurd/signal.h>, Samuel Thibault, 2015/02/09
- [hurd] 35/37: Explicit the keymap compatibility flags, Samuel Thibault, 2015/02/09
- [hurd] 03/37: proc: implement `proc_make_task_namespace', Samuel Thibault, 2015/02/09
- [hurd] 28/37: auth: simplify expression, Samuel Thibault, 2015/02/09
- [hurd] 29/37: auth: remove implicit assumption about the bootstrap process,
Samuel Thibault <=
- [hurd] 22/37: Backport Linux changes for proper TCP EOF handling, Samuel Thibault, 2015/02/09
- [hurd] 05/37: libpager: remove the `seqno' parameters, Samuel Thibault, 2015/02/09
- [hurd] 06/37: libpager: use libports notification functions, Samuel Thibault, 2015/02/09
- [hurd] 09/37: Replace `bcopy' with `memcpy' or `memmove' as appropriate, Samuel Thibault, 2015/02/09
- [hurd] 31/37: console: fix error and notification port handling, Samuel Thibault, 2015/02/09
- [hurd] 08/37: Replace `bzero' with `memset', Samuel Thibault, 2015/02/09
- [hurd] 04/37: hurd: add `proc_make_task_namespace', Samuel Thibault, 2015/02/09