[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 40/70: libtrivfs: register libtrivfs-based translators as importa
From: |
Samuel Thibault |
Subject: |
[hurd] 40/70: libtrivfs: register libtrivfs-based translators as important |
Date: |
Mon, 16 Sep 2013 07:41:42 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit e3c51fc088975f5b74e68a314e8fdfc907ad9640
Author: Justus Winter <address@hidden>
Date: Thu Aug 15 09:38:01 2013 +0200
libtrivfs: register libtrivfs-based translators as important
Register libtrivfs-based translators running as root as important
processes at the proc server.
* libtrivfs/startup.c (trivfs_startup): Mark us as important.
---
libtrivfs/startup.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/libtrivfs/startup.c b/libtrivfs/startup.c
index 86b0f82..4d76d47 100644
--- a/libtrivfs/startup.c
+++ b/libtrivfs/startup.c
@@ -65,5 +65,24 @@ trivfs_startup(mach_port_t bootstrap, int flags,
if (!err && control)
*control = fsys;
+ /* Mark us as important. */
+ if (! err)
+ {
+ mach_port_t proc = getproc ();
+ if (proc == MACH_PORT_NULL)
+ /* /hurd/exec uses libtrivfs. We have no handle to the proc
+ server in /hurd/exec when it does its handshake with the
+ root filesystem, so fail graciously here. */
+ return 0;
+
+ err = proc_mark_important (proc);
+ /* This might fail due to permissions or because the old proc
+ server is still running, ignore any such errors. */
+ if (err == EPERM || err == EMIG_BAD_ID)
+ err = 0;
+
+ mach_port_deallocate (mach_task_self (), proc);
+ }
+
return err;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 19/70: trans: drop privileges in the null translator, (continued)
- [hurd] 19/70: trans: drop privileges in the null translator, Samuel Thibault, 2013/09/16
- [hurd] 35/70: proc: add proc_mark_important server code, Samuel Thibault, 2013/09/16
- [hurd] 20/70: tmpfs: drop privileges in the tmpfs translator, Samuel Thibault, 2013/09/16
- [hurd] 27/70: daemons: fix setsid(2) in console-run, Samuel Thibault, 2013/09/16
- [hurd] 14/70: Optimize translator string copy, Samuel Thibault, 2013/09/16
- [hurd] 13/70: libnetfs: properly respond to file_get_translator requests, Samuel Thibault, 2013/09/16
- [hurd] 23/70: Do not build gzip/bzip2 support, Samuel Thibault, 2013/09/16
- [hurd] 38/70: libdiskfs: register libdiskfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 34/70: proc: make the function check_owner available, Samuel Thibault, 2013/09/16
- [hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec servers., Samuel Thibault, 2013/09/16
- [hurd] 40/70: libtrivfs: register libtrivfs-based translators as important,
Samuel Thibault <=
- [hurd] 36/70: hurd: add proc_mark_important, Samuel Thibault, 2013/09/16
- [hurd] 43/70: Fix build, Samuel Thibault, 2013/09/16
- [hurd] 46/70: proc: keep track of {start,end}_code, Samuel Thibault, 2013/09/16
- [hurd] 45/70: Fix variable names, Samuel Thibault, 2013/09/16
- [hurd] 25/70: exec: remove the BFD code, Samuel Thibault, 2013/09/16
- [hurd] 26/70: hurd: add missing routines in process_reply.defs, Samuel Thibault, 2013/09/16
- [hurd] 63/70: trans/symlink.c: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 60/70: libdiskfs: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 56/70: libnetfs: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 41/70: mach-defpager: register mach-defpager translators as important, Samuel Thibault, 2013/09/16