[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mdate-sh vs. evil user/group names
From: |
Eric Blake |
Subject: |
Re: mdate-sh vs. evil user/group names |
Date: |
Wed, 28 Mar 2007 16:41:03 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
>
> Hi Eric,
>
> Apologies for the delay.
>
> * Eric Blake wrote on Thu, Mar 01, 2007 at 11:24:14PM CET:
> > mdate-sh fails miserably in the presence of user/group names that contain
> > spaces (bad practice, but particularly common on cygwin).
> [...]
> > OK to apply this patch?
>
> This patch looks ok for HEAD and branch-1-10, if `ls -n' works
> reasonably on Cygwin and MinGW. (What are the numbers that are
> returned, BTW?)
This was what triggered my bug report:
$ \ls -l -d / .
drwxr-xr-x+ 14 eblake Domain Users 0 Mar 28 10:06 .
drwxrwx---+ 15 eblake Users 0 Mar 14 10:36 /
$ gnulib/build-aux/mdate-sh .
Users March Mar
And with the fix:
$ \ls -n -l -d / .
drwxr-xr-x+ 14 22382 10513 0 Mar 28 10:06 .
drwxrwx---+ 15 22382 545 0 Mar 14 10:36 /
$ automake/lib/mdate-sh .
28 March 2007
So, on my machine, I am uid 22382, and a member of both groups 10513 and 545
(and yes, cygwin is a bit odd in that / is not typically owned by uid/gid 0).
>
> It would be even better if it came with a test to ensure correct
> functioning of the script, as far as portably possible. For example,
> it could test that three words are output, and that day and year are
> numeric. (As usual, I can write the test, but if you do it, then it
> will be done more quickly
I'll see what I can come up with, but it may be a few days before I have time
to focus on it (I'm about to head out of town for the weekend).
--
Eric Blake