[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 45/98: proc: store the privileged host port in _hurd_host_priv
From: |
Samuel Thibault |
Subject: |
[hurd] 45/98: proc: store the privileged host port in _hurd_host_priv |
Date: |
Tue, 14 Jan 2014 02:00:01 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 2c9422595f41635e2f4f7ef1afb7eece9001feae
Author: Justus Winter <address@hidden>
Date: Tue Nov 26 17:33:05 2013 +0100
proc: store the privileged host port in _hurd_host_priv
Store the privileged host port in _hurd_host_priv like it is done in
the root filesystem. This fixes the thread priority adjustment in the
proc server. Prior to this fix, a warning message "unable to adjust
libports thread priority" sometimes appeared early in the boot
process.
* proc/host.c (S_proc_getprivports): Adapt accordingly.
(S_proc_register_version): Likewise.
* proc/mgt.c (add_tasks): Likewise.
* proc/msg.c (tickle_init): Likewise.
* proc/main.c (main): Store the privileged host port in _hurd_host_priv.
* proc/proc.h: Remove unused variable master_host_port.
fixup_store_priv_port
---
proc/host.c | 4 ++--
proc/main.c | 4 ++--
proc/mgt.c | 2 +-
proc/msg.c | 2 +-
proc/proc.h | 1 -
5 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/proc/host.c b/proc/host.c
index 488863b..b5c93b4 100644
--- a/proc/host.c
+++ b/proc/host.c
@@ -70,7 +70,7 @@ S_proc_getprivports (struct proc *p,
if (! check_uid (p, 0))
return EPERM;
- *hostpriv = master_host_port;
+ *hostpriv = _hurd_host_priv;
*devpriv = master_device_port;
return 0;
}
@@ -419,7 +419,7 @@ S_proc_register_version (pstruct_t server,
/* No need to check SERVER here; we don't use it. */
- if (credential != master_host_port)
+ if (credential != _hurd_host_priv)
/* Must be privileged to register for uname. */
return EPERM;
diff --git a/proc/main.c b/proc/main.c
index 6b18737..7be89ce 100644
--- a/proc/main.c
+++ b/proc/main.c
@@ -92,7 +92,7 @@ main (int argc, char **argv, char **envp)
startup_port = ports_get_send_right (startup_proc);
err = startup_procinit (boot, startup_port, &startup_proc->p_task,
- &authserver, &master_host_port, &master_device_port);
+ &authserver, &_hurd_host_priv, &master_device_port);
assert_perror (err);
mach_port_deallocate (mach_task_self (), startup_port);
@@ -111,7 +111,7 @@ main (int argc, char **argv, char **envp)
important. */
err = thread_get_assignment (mach_thread_self (), &pset);
assert_perror (err);
- err = host_processor_set_priv (master_host_port, pset, &psetcntl);
+ err = host_processor_set_priv (_hurd_host_priv, pset, &psetcntl);
assert_perror (err);
thread_max_priority (mach_thread_self (), psetcntl, 0);
assert_perror (err);
diff --git a/proc/mgt.c b/proc/mgt.c
index 11b2f39..602ba84 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -828,7 +828,7 @@ add_tasks (task_t task)
if (!foundp)
{
- host_processor_set_priv (master_host_port, psets[i], &psetpriv);
+ host_processor_set_priv (_hurd_host_priv, psets[i], &psetpriv);
processor_set_tasks (psetpriv, &tasks, &ntasks);
for (j = 0; j < ntasks; j++)
{
diff --git a/proc/msg.c b/proc/msg.c
index a6eca21..796cae3 100644
--- a/proc/msg.c
+++ b/proc/msg.c
@@ -40,7 +40,7 @@ static void *
tickle_init (void *initport)
{
startup_essential_task ((mach_port_t) initport, mach_task_self (),
- MACH_PORT_NULL, "proc", master_host_port);
+ MACH_PORT_NULL, "proc", _hurd_host_priv);
return NULL;
}
diff --git a/proc/proc.h b/proc/proc.h
index d528a7d..783aba9 100644
--- a/proc/proc.h
+++ b/proc/proc.h
@@ -141,7 +141,6 @@ struct port_class *proc_class;
struct port_class *generic_port_class;
struct port_class *exc_class;
-mach_port_t master_host_port;
mach_port_t master_device_port;
mach_port_t generic_port; /* messages not related to a specific proc */
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, (continued)
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, Samuel Thibault, 2014/01/13
- [hurd] 51/98: libtrivfs: improve the trivfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 24/98: Clean up the included header files, Samuel Thibault, 2014/01/13
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 52/98: exec: improve the exec_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 34/98: mach-defpager: drop all register qualifiers, Samuel Thibault, 2014/01/13
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 12/98: mach-defpager: remove unused variables, Samuel Thibault, 2014/01/13
- [hurd] 45/98: proc: store the privileged host port in _hurd_host_priv,
Samuel Thibault <=
- [hurd] 36/98: libports: fix right leaks when adjusting priorities, Samuel Thibault, 2014/01/13
- [hurd] 65/98: trans: fix the use of the hash table in fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 37/98: libshouldbeinlibc: fix minor port leak in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 38/98: init: fix port leak, Samuel Thibault, 2014/01/13
- [hurd] 68/98: trans: fix locking issue in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 55/98: pflocal: improve the demuxer functions, Samuel Thibault, 2014/01/13
- [hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c, Samuel Thibault, 2014/01/13
- [hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 41/98: libports: improve error handling in ports_reallocate_from_external, Samuel Thibault, 2014/01/13
- [hurd] 40/98: libports: improve error handling in ports_reallocate_port, Samuel Thibault, 2014/01/13