[PATCH 13/17] libtrivfs: add fsys_get_source

2013-07-11 Thread Justus Winter
--git a/libtrivfs/fsys-get-source.c b/libtrivfs/fsys-get-source.c new file mode 100644 index 000..9b6933e --- /dev/null +++ b/libtrivfs/fsys-get-source.c @@ -0,0 +1,34 @@ +/* fsys_get_source + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4

[PATCH 15/17] hurd: add fsys_get_source

2013-07-11 Thread Justus Winter
--- hurd/fsys.defs |8 1 file changed, 8 insertions(+) diff --git a/hurd/fsys.defs b/hurd/fsys.defs index 4b649d9..4f89946 100644 --- a/hurd/fsys.defs +++ b/hurd/fsys.defs @@ -135,3 +135,11 @@ routine fsys_get_children ( server: fsys_t; RPT out children: data

[PATCH 16/17] XXX this looks wrong to me, please have a look

2013-07-11 Thread Justus Winter
--- libfshelp/start-translator-long.c |1 + 1 file changed, 1 insertion(+) diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c index 55fb0ff..9680871 100644 --- a/libfshelp/start-translator-long.c +++ b/libfshelp/start-translator-long.c @@ -293,6 +293,7 @@ fshe

Re: [PATCH 10/17] hurd: add fsys_get_children

2013-07-12 Thread Justus Winter
Quoting Samuel Thibault (2013-07-12 14:44:31) > Neal H. Walfield, le Fri 12 Jul 2013 13:52:17 +0200, a écrit : > > I apologize if you've already explained this someplace else. > > > > If I understand correctly, you want to get all the nodes with active > > and passive translators. This potentiall

Re: patches for sysvinit, debian repository for testing

2013-07-15 Thread Justus Winter
Quoting Samuel Thibault (2013-07-15 11:18:03) > Hello, > > Justus Winter, le Tue 09 Jul 2013 10:46:43 +0200, a écrit : > > this is a patch series for the sysvinit package. Comments are > > welcome. Patches seven and eight are somewhat questionable, but I'd > > pro

[PATCH] libnetfs: properly respond to file_get_translator requests

2013-07-16 Thread Justus Winter
Properly respond to file_get_translator requests for nodes with a passive translator record. * libnetfs/file-get-translator.c (netfs_S_file_get_translator): Handle passive translator records. --- libnetfs/file-get-translator.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH 4/4] Serve mounts node with a passive translator record

2013-07-16 Thread Justus Winter
Make mounts a node with a passive translator record so that the mtab translator is started on access if it is available. * rootdir.c (MTAB_TRANSLATOR): New macro. (rootdir_mounts_get_translator): New function. (mtab_translator_state): New enum. (rootdir_mounts_exists): New function. (rootdir_trans

[PATCH 1/4] Fix procfs_node_chmod

2013-07-16 Thread Justus Winter
Formerly only the mode_t bits cut out by S_IFMT were preserved, but this does not include S_IPTRANS. Fix this by preserving everything but the permission bits. * procfs.c (procfs_node_chmod): Fix bitmask. --- procfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/procfs.c

[PATCH 2/4] Fix default file ownership

2013-07-16 Thread Justus Winter
Formerly all nodes were created so that they were owned by root:root by default. This causes problems if the procfs translator is running as unprivileged user and serves passive translator records, because the file ownership is being used as credentials for starting translators. This obviously fail

[PATCH 3/4] Add the necessary infrastructure to serve passive translators

2013-07-16 Thread Justus Winter
* netfs.c (netfs_get_translator): New function. * procfs.c (procfs_get_translator): Likewise. * procfs.h (struct procfs_node_ops): New field get_translator. (procfs_get_translator): New function declaration. --- netfs.c | 11 +++ procfs.c | 12 procfs.h |6 ++ 3 f

Re: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-16 Thread Justus Winter
Quoting Justus Winter (2013-07-09 08:22:09) > Ignore the --nodev, --noexec and --nosuid arguments. > > * procfs/main.c (argp_parser): Ignore some arguments for compatibility. > --- Ping.

add daemonizing support to console-client, initscript

2013-07-17 Thread Justus Winter
Hi, [PATCH 1/3] console-client: add daemonizing support This patch adds daemonizing support to console-client. [PATCH 2/3] Add (build) dependency on libdaemon [PATCH 3/3] Add an initscript for the hurd console These are for the debian repository only. They add the build and runtime dependency a

[PATCH 2/3] Add (build) dependency on libdaemon

2013-07-17 Thread Justus Winter
--- debian/control |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index eafb7a6..63b6889 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: mig (>= 1.3-2), gnumach-dev (>= 2:1.3.99.dfsg.cvs20070526), libc

[PATCH 1/3] console-client: add daemonizing support

2013-07-17 Thread Justus Winter
This patch adds daemonizing support using libdaemon. * console-client/console.c (daemonize): New variable. (options): Add --daemonize argument. (parse_opt): Handle --daemonize argument. (daemon_error): New error(3) like macro. (main): Daemonize. --- console-client/Makefile |2 +- console-cli

[PATCH 3/3] Add an initscript for the hurd console

2013-07-17 Thread Justus Winter
/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ hurd (20130707-2) UNRELEASED; urgency=low [ Justus Winter ] * Include the umount utility in hurd and hurd-udeb. + * Add an initscript for hurd-console. [ Samuel Thibault ] * Bump Standards-Version to 3.9.4 (no changes). diff

Re: [PATCH 3/3] Add an initscript for the hurd console

2013-07-17 Thread Justus Winter
Quoting Justus Winter (2013-07-17 13:09:06) > [...] > +DAEMON_ARGS="--daemonize -D > /home/teythoon/repos/hurd-upstream/console-client -d current_vcs -c /dev/vcs" Duh :/ I'll send an updated series. Justus

[PATCH 4/4] Drop hurd_console_startup.patch

2013-07-17 Thread Justus Winter
This is no longer necessary with the initscript in place. --- debian/patches/hurd_console_startup.patch | 32 - debian/patches/series |1 - 2 files changed, 33 deletions(-) delete mode 100644 debian/patches/hurd_console_startup.patch diff --g

[PATCH 2/4] Add (build) dependency on libdaemon

2013-07-17 Thread Justus Winter
--- debian/control |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index eafb7a6..63b6889 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: mig (>= 1.3-2), gnumach-dev (>= 2:1.3.99.dfsg.cvs20070526), libc

[PATCH 1/4] console-client: add daemonizing support

2013-07-17 Thread Justus Winter
This patch adds daemonizing support using libdaemon. * console-client/console.c (daemonize): New variable. (options): Add --daemonize argument. (parse_opt): Handle --daemonize argument. (daemon_error): New error(3) like macro. (main): Daemonize. --- console-client/Makefile |2 +- console-cli

[PATCH 3/4] Add an initscript for the hurd console

2013-07-17 Thread Justus Winter
/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ hurd (20130707-2) UNRELEASED; urgency=low [ Justus Winter ] * Include the umount utility in hurd and hurd-udeb. + * Add an initscript for hurd-console. [ Samuel Thibault ] * Bump Standards-Version to 3.9.4 (no changes). diff

Re: [PATCH 10/17] hurd: add fsys_get_children

2013-07-18 Thread Justus Winter
Quoting Samuel Thibault (2013-07-15 10:26:18) > Neal H. Walfield, le Fri 12 Jul 2013 15:13:30 +0200, a écrit : > > How do you do permission checking? > > > > Making a directory executable but not readable is a useful way to > > grant permission by knowledge of a shared secret. > > Right. > > Tha

[PATCH] Fix error handling macro E

2013-07-18 Thread Justus Winter
Previously the macro argument err was expanded and thus potentially evaluated multiple times. This is fine for simple values or pure functions, but not for say iohelp_create_iouser. Fix this by evaluating the macro argument only once. --- libiohelp/iouser-create.c |3 ++- 1 file changed, 2 ins

[PATCH 02/17] pfinet: Fix call to kfree_s

2013-07-19 Thread Justus Winter
kfree_s expects a pointer and a size argument. Currently the sizeof(cache) is used as size argument, this is certainly not what was intented. For reference, this code was present in Linux up to version 2.3.14 and was replaced in 2.3.15. Found using coccinelle and https://raw.github.com/coccinelle

feature-mtab-translator (v3)

2013-07-19 Thread Justus Winter
Hi, this is a updated patch series for the mtab translator. I believe I have cleanly addressed all concerns and all issues I encountered while I was testing the translator (I'm dogfooding by the way). Notable changes: * The correct path is now stored in the peropen struct. The fact that it pre

[PATCH 06/17] libdiskfs: add fsys_get_children

2013-07-19 Thread Justus Winter
s_get_children + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public

[PATCH 04/17] libnetfs: track file name in struct peropen

2013-07-19 Thread Justus Winter
--- libnetfs/dir-lookup.c | 23 +++ libnetfs/fsys-getroot.c|6 +- libnetfs/make-peropen.c|8 libnetfs/netfs.h |2 ++ libnetfs/release-peropen.c |1 + 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/libnetfs/di

[PATCH 03/17] libdiskfs: track file name in struct peropen

2013-07-19 Thread Justus Winter
--- libdiskfs/dir-lookup.c | 24 libdiskfs/diskfs.h |3 +++ libdiskfs/fsys-getroot.c |3 ++- libdiskfs/peropen-make.c |8 libdiskfs/peropen-rele.c |1 + 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/libdiskfs/dir-lookup.c

[PATCH 05/17] libfshelp: add translator-list.c

2013-07-19 Thread Justus Winter
mode 100644 index 000..a04f424 --- /dev/null +++ b/libfshelp/translator-list.c @@ -0,0 +1,161 @@ +/* + Copyright (C) 2013 Free Software Foundation + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + This program is free softwar

[PATCH 08/17] libtrivfs: add fsys_get_children

2013-07-19 Thread Justus Winter
-children.c b/libtrivfs/fsys-get-children.c new file mode 100644 index 000..aa9135f --- /dev/null +++ b/libtrivfs/fsys-get-children.c @@ -0,0 +1,36 @@ +/* fsys_get_children + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg

[PATCH 07/17] libnetfs: add fsys_get_children

2013-07-19 Thread Justus Winter
lock (&np->lock); return err; diff --git a/libnetfs/fsys-get-children.c b/libnetfs/fsys-get-children.c new file mode 100644 index 000..3eb7b41 --- /dev/null +++ b/libnetfs/fsys-get-children.c @@ -0,0 +1,113 @@ +/* fsys_get_children + + Copyright (C) 2013 Free Software F

[PATCH 09/17] trans/symlink.c: add fsys_get_children

2013-07-19 Thread Justus Winter
--- trans/symlink.c |8 1 file changed, 8 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 03b5100..5e9e09a 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -221,3 +221,11 @@ S_fsys_forward (mach_port_t server, mach_port_t requestor, { return EOPNOTSUPP; }

[PATCH 01/17] libnetfs: implement file_get_translator_cntl

2013-07-19 Thread Justus Winter
This is a trivially adapted version of libdiskfs/file-get-transcntl.c. * libnetfs/file-get-transcntl.c: New file. --- libnetfs/Makefile |2 +- libnetfs/file-get-transcntl.c | 52 + libnetfs/fsstubs.c|8 --- 3 files chan

[PATCH 17/17] add mtab prototype

2013-07-19 Thread Justus Winter
): %: %.o diff --git a/trans/mtab.c b/trans/mtab.c new file mode 100644 index 000..729b9b8 --- /dev/null +++ b/trans/mtab.c @@ -0,0 +1,682 @@ +/* This is an mtab translator. + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg

[PATCH 10/17] hurd: add fsys_get_children

2013-07-19 Thread Justus Winter
--- hurd/fsys.defs |8 1 file changed, 8 insertions(+) diff --git a/hurd/fsys.defs b/hurd/fsys.defs index 979a6cf..4b649d9 100644 --- a/hurd/fsys.defs +++ b/hurd/fsys.defs @@ -127,3 +127,11 @@ routine fsys_get_options ( server: fsys_t; RPT out options: data_t,

[PATCH 13/17] libtrivfs: add fsys_get_source

2013-07-19 Thread Justus Winter
--git a/libtrivfs/fsys-get-source.c b/libtrivfs/fsys-get-source.c new file mode 100644 index 000..9b6933e --- /dev/null +++ b/libtrivfs/fsys-get-source.c @@ -0,0 +1,34 @@ +/* fsys_get_source + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4

[PATCH 11/17] libdiskfs: add fsys_get_source

2013-07-19 Thread Justus Winter
/fsys-get-source.c b/libdiskfs/fsys-get-source.c new file mode 100644 index 000..e7e0e78 --- /dev/null +++ b/libdiskfs/fsys-get-source.c @@ -0,0 +1,35 @@ +/* fsys_get_source + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-ha

[PATCH 12/17] libnetfs: add fsys_get_source

2013-07-19 Thread Justus Winter
Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2,

[PATCH 15/17] hurd: add fsys_get_source

2013-07-19 Thread Justus Winter
--- hurd/fsys.defs |7 +++ 1 file changed, 7 insertions(+) diff --git a/hurd/fsys.defs b/hurd/fsys.defs index 4b649d9..27ada29 100644 --- a/hurd/fsys.defs +++ b/hurd/fsys.defs @@ -135,3 +135,10 @@ routine fsys_get_children ( server: fsys_t; RPT out children: data_

[PATCH 14/17] trans/symlink.c: add fsys_get_source

2013-07-19 Thread Justus Winter
--- trans/symlink.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 5e9e09a..946c950 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -229,3 +229,10 @@ S_fsys_get_children (mach_port_t server, { return EOPNOTSUPP; } + +error_t +S_fsys

[PATCH 16/17] XXX this looks wrong to me, please have a look

2013-07-19 Thread Justus Winter
--- libfshelp/start-translator-long.c |1 + 1 file changed, 1 insertion(+) diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c index 55fb0ff..9680871 100644 --- a/libfshelp/start-translator-long.c +++ b/libfshelp/start-translator-long.c @@ -293,6 +293,7 @@ fshe

Re: feature-mtab-translator (v3)

2013-07-19 Thread Justus Winter
Quoting Richard Braun (2013-07-19 17:41:55) > On Fri, Jul 19, 2013 at 05:25:02PM +0200, Justus Winter wrote: > > Richard mentioned that revealing mount points does not seem to be a > > concern on Linux, but arguably on Hurd an active translator is more > > common than a moun

[PATCH 3/4] rootdir.c: Fix declaration of rootdir_fakeself_exists.

2013-07-22 Thread Justus Winter
* rootdir.c (rootdir_fakeself_exists): Use the correct arguments for this kind of function. --- rootdir.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir.c b/rootdir.c index 9fc326a..f234dd0 100644 --- a/rootdir.c +++ b/rootdir.c @@ -392,7 +392,7 @@ out: } stat

[PATCH 2/4] rootdir.c: Fix compiler warning

2013-07-22 Thread Justus Winter
* rootdir.c (rootdir_gc_meminfo): Use unsigned long constant. --- rootdir.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootdir.c b/rootdir.c index 31e2d8c..9fc326a 100644 --- a/rootdir.c +++ b/rootdir.c @@ -300,7 +300,7 @@ rootdir_gc_meminfo (void *hook, char **contents

[PATCH 1/4] Makefile: add -lpthread

2013-07-22 Thread Justus Winter
* Makefile (LIBS): Link with libpthread. --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c69cb20..dcb9e3d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ TARGET = procfs OBJS = procfs.o netfs.o procfs_dir.o \ process.o pr

[PATCH 4/4] Serve mounts node with a passive translator record

2013-07-22 Thread Justus Winter
Make mounts a node with a passive translator record so that the mtab translator is started on access if it is available. * rootdir.c (MTAB_TRANSLATOR): New macro. (rootdir_mounts_get_translator): New function. (rootdir_mounts_exists): New function. (rootdir_translator_make_node): Likewise. (rootdi

Re: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness

2013-07-22 Thread Justus Winter
Quoting Pino Toscano (2013-07-22 15:57:45) > Alle martedì 9 luglio 2013, Justus Winter ha scritto: > > pidof -s returns the first matching process. Since readdir(2) on > > procfs returns the processes in ascending order, this returns the > > first process. This is more robust

[PATCH 3/7] init: Mark auth, proc and fs servers as essential

2013-07-23 Thread Justus Winter
This is a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed and the copyright year is adjusted. * init/init.c (launch_core_servers): Mark auth, proc and fs servers as essential. --- init/init.c | 11

[PATCH 6/7] proc: evil hack, mark all pids<100 essential

2013-07-23 Thread Justus Winter
--- proc/mgt.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/proc/mgt.c b/proc/mgt.c index c754a4b..cfd7c26 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -650,6 +650,9 @@ complete_proc (struct proc *p, pid_t pid) p->p_pid = pid; + /* XXX */ + p->p_essential = pid < 100; + ids

[PATCH 5/7] proc: Fix miscalculation of count

2013-07-23 Thread Justus Winter
* proc/pgrp.c (S_proc_getpgrppids): Fix miscalculation of count. --- proc/pgrp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/pgrp.c b/proc/pgrp.c index 3b5dba1..403de97 100644 --- a/proc/pgrp.c +++ b/proc/pgrp.c @@ -265,7 +265,7 @@ S_proc_getpgrppids (struct proc *c

[PATCH 1/7] proc: add proc_mark_essential server code

2013-07-23 Thread Justus Winter
This is a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed and the copyright year is adjusted. * proc/proc.h (struct proc): Add p_essential member. * proc/pgrp.c (S_proc_getpgrppids): Exclude essential system

[PATCH 2/7] hurd: add proc_mark_essential

2013-07-23 Thread Justus Winter
This is a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed and the copyright year is adjusted. * hurd/process.defs (proc_mark_essential): New routine definition. * hurd/process_request.defs (proc_mark_essentia

[PATCH 4/7] init: Build fixes

2013-07-23 Thread Justus Winter
* init/Makefile: Build and link with processUser.o. * init/init.c: Include process_U.h. --- init/Makefile |2 +- init/init.c |1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/init/Makefile b/init/Makefile index ffb82ff..5ae3b50 100644 --- a/init/Makefile +++ b/init/Make

kill (0, SIGSTOP) is freezing the system (was: /hurd/init and /hurd/proc)

2013-07-23 Thread Justus Winter
Hi, [PATCH 1/7] proc: add proc_mark_essential server code [PATCH 2/7] hurd: add proc_mark_essential [PATCH 3/7] init: Mark auth, proc and fs servers as essential This is a refreshed but otherwise unmodified version of Guillems patch series presented here: http://lists.gnu.org/archive/html/bug-hur

/hurd/init as pid 2, running runsystem as pid 1

2013-07-25 Thread Justus Winter
Hi, attached is a patch that reserves pid 1 for whatever process /hurd/init starts. runsystem.sysv for example execs /sbin/init, so sysvinit is happily running as pid 1. /hurd/init get's to be pid 2, so everyone who needs shutdown notification now has to talk to pid 2. The kernel and other server

[PATCH] prototype: runsystem as pid 1

2013-07-25 Thread Justus Winter
--- exec/main.c |2 +- hurd/process.defs|7 +++ init/Makefile|2 +- init/init.c |8 ++-- libdiskfs/boot-start.c |2 +- libdiskfs/init-startup.c |2 +- pfinet/main.c|2 +- proc/main.c |6

Re: [PATCH] prototype: runsystem as pid 1

2013-07-26 Thread Justus Winter
Quoting Samuel Thibault (2013-07-25 22:52:44) > Justus Winter, le Thu 25 Jul 2013 22:41:09 +0200, a écrit : > > - err = proc_getmsgport (procserver, 1, &startup); > > + err = proc_getmsgport (procserver, 2, &startup); > > Maybe make it a #define, so it'll be ea

Re: kill (0, SIGSTOP) is freezing the system (was: /hurd/init and /hurd/proc)

2013-07-26 Thread Justus Winter
Quoting Samuel Thibault (2013-07-24 15:15:52) > Justus Winter, le Wed 24 Jul 2013 08:30:52 +0200, a écrit : > > the processes below 100 that are > > not marked as essential by Guillems patch are: > > > > exec, > > That one should be easy. Yes, /h

[PATCH 3/3] init: Build and link against processUser.o

2013-07-26 Thread Justus Winter
This patch allows one to build init without the need to rebuild the libc at the expense of the user stubs being compiled into init. * Makefile (OBJS): Add processUser.o. --- init/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/Makefile b/init/Makefile index ff

[PATCH 1/3] Define and use symbolic names for important processes

2013-07-26 Thread Justus Winter
/pids.h b/include/pids.h new file mode 100644 index 000..485916b --- /dev/null +++ b/include/pids.h @@ -0,0 +1,29 @@ +/* List of special processes. + + Copyright (C) 2013 Free Software Foundation + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of t

[PATCH 2/3] Add proc_setinittask, make runsystem pid 1

2013-07-26 Thread Justus Winter
* hurd/process.defs (proc_setinittask): New procedure. * include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly. * init/init.c (start_child): Register the child task. * proc/proc.h (init_proc): New variable. (create_startup_proc): Rename to create_init_proc. * proc/main.c (main): Create

[PATCH 1/5] Add configure checks for libdaemon

2013-07-26 Thread Justus Winter
* configure.ac: Add check for libdaemon. * config.make.in: Make the libdaemon specific variables available. --- config.make.in |5 + configure.ac |6 ++ 2 files changed, 11 insertions(+) diff --git a/config.make.in b/config.make.in index b8002a1..73b54de 100644 --- a/config.make

[PATCH 4/5] Add an initscript for the hurd console

2013-07-26 Thread Justus Winter
/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ hurd (20130707-2) UNRELEASED; urgency=low [ Justus Winter ] * Include the umount utility in hurd and hurd-udeb. + * Add an initscript for hurd-console. [ Samuel Thibault ] * Bump Standards-Version to 3.9.4 (no changes). diff

[PATCH 3/5] debian/control: Add build dependency on libdaemon

2013-07-26 Thread Justus Winter
--- debian/control |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index a2801c6..957ab53 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: mig (>= 1.3-2), gnumach-dev (>= 2:1.3.99.dfsg.cvs20070526), libc0.3-de

[PATCH 5/5] Drop hurd_console_startup.patch

2013-07-26 Thread Justus Winter
This is no longer necessary with the initscript in place. --- debian/patches/hurd_console_startup.patch | 32 - debian/patches/series |1 - 2 files changed, 33 deletions(-) delete mode 100644 debian/patches/hurd_console_startup.patch diff --g

[PATCH 2/5] console-client: add daemonizing support

2013-07-26 Thread Justus Winter
This patch adds daemonizing support using libdaemon. * console-client/console.c (daemonize): New variable. (options): Add --daemonize argument. (parse_opt): Handle --daemonize argument. (daemon_error): New error(3) like macro. (main): Daemonize. * console-client/Makefile: Use libdaemon specific bu

[PATCH 1/4] libshouldbeinlibc: Add nullauth.{c,h}

2013-07-27 Thread Justus Winter
+++ b/libshouldbeinlibc/nullauth.c @@ -0,0 +1,47 @@ +/* Drop all authentication credentials. + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + This program is free software; y

[PATCH 3/4] tmpfs: drop privileges in the tmpfs translator

2013-07-27 Thread Justus Winter
* tmpfs/tmpfs.c (main): Drop privileges. --- tmpfs/tmpfs.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c index 7da3dd5..1872a7d 100644 --- a/tmpfs/tmpfs.c +++ b/tmpfs/tmpfs.c @@ -29,6 +29,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 0

Dropping privileges in various translators

2013-07-27 Thread Justus Winter
Hi folks :) this is a patch series adding setnullauth () to libshouldbeinlibc and demonstrating its use for dropping unix privileges in the null and tmpfs translators. A nullauth utility is provided to start arbitrary programs without any privileges. This can be used to run the translator on /dev/

[PATCH 2/4] trans: drop privileges in the null translator

2013-07-27 Thread Justus Winter
* trans/null.c (main): Drop privileges. --- trans/null.c |5 + 1 file changed, 5 insertions(+) diff --git a/trans/null.c b/trans/null.c index 1f985b3..8b3b4e0 100644 --- a/trans/null.c +++ b/trans/null.c @@ -31,6 +31,7 @@ #include #include #include +#include const char *argp_pr

[PATCH 4/4] utils: add nullauth utility

2013-07-27 Thread Justus Winter
. + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public Lice

mtab translator (v4)

2013-07-30 Thread Justus Winter
Hi folks :) this is the fourth version of my mtab patch series. I consider it feature complete. Notable changes: * Deadname notifications for translators now work on libnetfs. * The path in peropen structs is updated if a node is moved. * Lot's of cleanups, comments, updated copyright years... *

[PATCH 02/16] libnetfs: handle dead-name notifications

2013-07-30 Thread Justus Winter
Handle dead-name notifications the same way libdiskfs does. In fact, dead-name.c is a verbatim copy with trivial modifications. It clears np->sockaddr if the dead name notification was for that port. * libnetfs/dead-name.c: New file. * libnetfs/Makefile (OTHERSRCS): Add dead-name.c. --- libnetfs/

[PATCH 01/16] libnetfs: implement file_get_translator_cntl

2013-07-30 Thread Justus Winter
This is a trivially adapted version of libdiskfs/file-get-transcntl.c. * libnetfs/file-get-transcntl.c: New file. --- libnetfs/Makefile |2 +- libnetfs/file-get-transcntl.c | 52 + libnetfs/fsstubs.c|8 --- 3 files chan

[PATCH 05/16] libfshelp: add translator-list.c

2013-07-30 Thread Justus Winter
) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published

[PATCH 03/16] libdiskfs: track file name in struct peropen

2013-07-30 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libdiskfs/diskfs.h (struct peropen): New field path. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path. * libdiskfs/fsys-getroot.c (diskfs_S

[PATCH 06/16] libdiskfs: add fsys_get_children

2013-07-30 Thread Justus Winter
,0 +1,99 @@ +/* fsys_get_children + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the

[PATCH 07/16] libnetfs: add fsys_get_children

2013-07-30 Thread Justus Winter
t_children + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU Gener

[PATCH 04/16] libnetfs: track file name in struct peropen

2013-07-30 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libnetfs/netfs.h (struct peropen): New field path. * libnetfs/make-peropen.c (netfs_make_peropen): Initialize path. * libnetfs/release-peropen.c (netfs_release_peropen): Free path. * libnetfs/fsys-getroot.c (netfs_S_fsys

[PATCH 08/16] libtrivfs: add fsys_get_children

2013-07-30 Thread Justus Winter
Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free So

[PATCH 12/16] libnetfs: add fsys_get_source

2013-07-30 Thread Justus Winter
, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foun

[PATCH 14/16] trans/symlink.c: add fsys_get_source

2013-07-30 Thread Justus Winter
Create a server function returning EOPNOTSUPP. * trans/symlink.c (S_fsys_get_source): New function. --- trans/symlink.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 30b9712..5ccac6d 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -229

[PATCH 11/16] libdiskfs: add fsys_get_source

2013-07-30 Thread Justus Winter
Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Fr

[PATCH 15/16] hurd: add fsys_get_source

2013-07-30 Thread Justus Winter
Return information about the source of the receiving filesystem. If the concept of a source is applicable, SOURCE should refer to the source of the receiving translator and should be a description considered appropriate in the context of the translator. For example for the case of block device bas

[PATCH 09/16] trans/symlink.c: add fsys_get_children

2013-07-30 Thread Justus Winter
Create a server function returning EOPNOTSUPP. * trans/symlink.c (S_fsys_get_children): New function. --- trans/symlink.c |8 1 file changed, 8 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 03b5100..30b9712 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -

[PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Justus Winter
fsys_get_children returns any active translators bound to nodes of the receiving filesystem as an argz vector containing file names relative to the root of the receiving translator. * hurd/fsys.defs: Add fsys_get_children. * hurd/fsys_reply.defs: Add fsys_get_children. --- hurd/fsys.defs |

[PATCH 13/16] libtrivfs: add fsys_get_source

2013-07-30 Thread Justus Winter
--- /dev/null +++ b/libtrivfs/fsys-get-source.c @@ -0,0 +1,33 @@ +/* fsys_get_source + + Copyright (C) 2013 Free Software Foundation, Inc. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redist

[PATCH 16/16] trans: add mtab translator

2013-07-30 Thread Justus Winter
. + + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation;

Re: kill (0, SIGSTOP) is freezing the system (was: /hurd/init and /hurd/proc)

2013-07-31 Thread Justus Winter
Quoting Samuel Thibault (2013-07-29 13:36:33) > Justus Winter, le Fri 26 Jul 2013 13:24:49 +0200, a écrit : > > > > I'm not sure about how important it is not to freeze anyone of them, > > > > but at least procfs must not be stopped b/c killall5 wants

[PATCH 08/16] libdiskfs: register libdiskfs-based translators as important

2013-08-05 Thread Justus Winter
Register libdiskfs-based translators running as root as important processes at the proc server. * libdiskfs/init-startup.c (_diskfs_init_completed): Mark us as important. --- libdiskfs/init-startup.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/libdiskfs/init-startup.c b/libdiskfs

[PATCH 01/16] hurd: add missing routines in process_reply.defs

2013-08-05 Thread Justus Winter
Add the appropriate simpleroutine or skip directives to hurd/process_reply.defs matching the ones in hurd/process.defs. * hurd/process_reply.defs: Add missing routine declarations. --- hurd/process_reply.defs | 114 +++ 1 file changed, 114 insertions(+

[PATCH 04/16] proc: make the function check_owner available

2013-08-05 Thread Justus Winter
Make the function check_owner available for use in other files. * proc/info.c (check_owner): Drop attributes static and inline. * proc/proc.h (check_owner): Add prototype. --- proc/info.c |2 +- proc/proc.h |1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/proc/info.c b/

Make sysvinit pid 1, fix killall5

2013-08-05 Thread Justus Winter
Hi, this is a unified patch series fixing all sysvinit related issues. [PATCH 01/16] hurd: add missing routines in process_reply.defs [PATCH 02/16] Define and use symbolic names for important processes These can be merged now. [PATCH 03/16] Add proc_set_init_task, make runsystem pid 1 This nee

[PATCH 06/16] hurd: add proc_mark_important

2013-08-05 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 03/16] Add proc_set_init_task, make runsystem pid 1

2013-08-05 Thread Justus Winter
* hurd/process.defs (proc_set_init_task): New procedure. * hurd/process_reply.defs (proc_set_init_task): Likewise. * hurd/process_request.defs (proc_set_init_task): Likewise. * include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly. * init/init.c (start_child): Register the child task. *

[PATCH 02/16] Define and use symbolic names for important processes

2013-08-05 Thread Justus Winter
/pids.h b/include/pids.h new file mode 100644 index 000..485916b --- /dev/null +++ b/include/pids.h @@ -0,0 +1,29 @@ +/* List of special processes. + + Copyright (C) 2013 Free Software Foundation + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of t

[PATCH 05/16] proc: add proc_mark_important server code

2013-08-05 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 16/16] Build fixes: Build processUser.o and link against it

2013-08-05 Thread Justus Winter
The process interfaces got new routines, add processUser.o so that they get picked up by the servers that need them. As I understand it this is no longer necessary once the libc has been rebuilt with the new definitions. So this patch can either be omitted if the libc is rebuild first, or committe

[PATCH 12/16] trans: register symlink translators as important

2013-08-05 Thread Justus Winter
Register any symlink translators running as root as important processes at the proc server. * trans/symlink.c (main): Mark us as important. --- trans/symlink.c | 12 1 file changed, 12 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 03b5100..b3e8441 100644 --- a

[PATCH 07/16] init: Mark all of inits children and init itself as important

2013-08-05 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 14/16] hurd: add proc_{get,set}_code

2013-08-05 Thread Justus Winter
Add routines to set and query the processes start_code and end_code locations. Any executable segments loaded from the ELF binary are in this range. * hurd/process.defs: Add proc_{get,set}_code. * hurd/process_reply.defs: Add proc_{get,set}_code. * hurd/process_request.defs: Add proc_{get,set}_cod

<    1   2   3   4   5   6   7   8   9   10   >