Re: feature-mtab-translator (v3)

2013-07-22 Thread Samuel Thibault
Neal H. Walfield, le Mon 22 Jul 2013 21:50:02 +0200, a écrit : > At Fri, 19 Jul 2013 17:25:02 +0200, > Justus Winter wrote: > > * The translator used to traverse the translator tree and if it > > encountered itself, it would deadlock. This is cleanly solved by > > comparing the control ports of

Re: [PATCH 17/17] add mtab prototype

2013-07-22 Thread Samuel Thibault
Neal H. Walfield, le Mon 22 Jul 2013 17:23:39 +0200, a écrit : > At Fri, 19 Jul 2013 17:25:19 +0200, > Justus Winter wrote: > > +static char *path = NULL; > > +static int insecure = 0; > > Don't explicitly initialize static variables to 0 or NULL. This takes > up unnecessary space in the executab

Re: feature-mtab-translator (v3)

2013-07-22 Thread Neal H. Walfield
At Fri, 19 Jul 2013 17:25:02 +0200, Justus Winter wrote: > * The translator used to traverse the translator tree and if it > encountered itself, it would deadlock. This is cleanly solved by > comparing the control ports of the current node and the mtab > translator. I don't think you can rel

Re: feature-mtab-translator (v3)

2013-07-22 Thread Neal H. Walfield
At Fri, 19 Jul 2013 18:04:47 +0200, Justus Winter wrote: > My personal preference would be to run the translator on /proc/mounts > as unprivileged user created solely for this purpose by default. This is not how things are done on the Hurd. You don't need an "unpriviledged user" you just drop al

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 if there is more than

Re: [PATCH 17/17] add mtab prototype

2013-07-22 Thread Neal H. Walfield
At Fri, 19 Jul 2013 17:25:19 +0200, Justus Winter wrote: > +static char *path = NULL; > +static int insecure = 0; Don't explicitly initialize static variables to 0 or NULL. This takes up unnecessary space in the executable and prevents using zero-filled memory. Neal

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

2013-07-22 Thread Pino Toscano
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 if there is more than one > /sbin/init process. > > Currently on Hurd th

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

2013-07-22 Thread Neal H. Walfield
If you take this approach, you need to update relpath on renames. Do you? (I may have missed that.) Neal At Fri, 19 Jul 2013 17:25:05 +0200, Justus Winter wrote: > > --- > libdiskfs/dir-lookup.c | 24 > libdiskfs/diskfs.h |3 +++ > libdiskfs/fsys-getroot

Re: feature-mtab-translator (v3)

2013-07-22 Thread Neal H. Walfield
At Fri, 19 Jul 2013 18:04:47 +0200, Justus Winter wrote: > My personal preference would be to run the translator on /proc/mounts > as unprivileged user created solely for this purpose by default. It's > up to the system administrator to change that if he wishes. I know > it's not as magically as it

[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

[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

Re: [PATCH 15/17] hurd: add fsys_get_source

2013-07-22 Thread Neal H. Walfield
This needs much better documentation. At Fri, 19 Jul 2013 17:25:17 +0200, Justus Winter wrote: > > --- > 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.def

[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 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

Re: [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS.

2013-07-22 Thread Pino Toscano
Alle martedì 9 luglio 2013, Justus Winter ha scritto: > index 5937d98..02ac88f 100644 > --- a/src/killall5.c > +++ b/src/killall5.c > @@ -373,7 +373,7 @@ int check4nfs(const char * path, char * real) > { > char buf[PATH_MAX+1]; > const char *curr; > - int deep = MAXSYMLINKS; > +

Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd.

2013-07-22 Thread Pino Toscano
Alle martedì 9 luglio 2013, Justus Winter ha scritto: > diff --git a/debian/sysvinit.postinst b/debian/sysvinit.postinst > index 1750412..061f53b 100755 > --- a/debian/sysvinit.postinst > +++ b/debian/sysvinit.postinst > @@ -85,6 +85,10 @@ then > if [ ! -f /etc/inittab ] > then > cp -p /usr/s

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

2013-07-22 Thread Pino Toscano
Hi, just take care of the GNU indentation (yes, I'm being overly pedantic here), mostly missing spaces missing between function and parenthesis. Alle martedì 16 luglio 2013, Justus Winter ha scritto: > Make mounts a node with a passive translator record so that the mtab > translator is started o

Re: [PATCH 07/17] libnetfs: add fsys_get_children

2013-07-22 Thread Samuel Thibault
Justus Winter, le Fri 19 Jul 2013 17:25:09 +0200, a écrit : > + /* check_access performs the same permission check as is normally > + done, i.e. it checks that all but the last path components are > + executable by the requesting user and that the last component is > + readable.