On 2005-09-22 at 20:01:14 Andreas Metzler wrote:

> No, it has to be something in the 4.2.24 --> 4.2.25 changes.

Hm, I've looked into this somewhat more, and weirdly enough, 4.2.24
doesn't work properly either (at least for me):

$ ls -al
total 912
drwxrwxr-x  2 dim dim   4096 2005-09-23 15:01:59 ./
drwxrwxr-x  7 dim dim   4096 2005-09-23 15:01:27 ../
-rw-rw-r--  1 dim dim 151646 2005-03-20 11:02:10 findutils_4.1.20-6_i386.deb
-rw-r--r--  1 dim dim 370796 2005-09-23 14:58:02 findutils_4.2.24-1_i386.deb
-rw-r--r--  1 dim dim 382656 2005-09-23 14:59:22 findutils_4.2.25-1_i386.deb
$ find --version
GNU find version 4.1.20
$ find . -perm +g+w
.
/findutils_4.1.20-6_i386.deb
$ find . -perm /g+w
find: invalid mode `/g+w'
$

This is on Sarge, where 4.1.20 is still the default. It seems to work
correctly, although the /perm syntax is not yet supported.

Then I built 4.2.24-1 from the dsc file:

$ find --version
GNU find version 4.2.24
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
$ find . -perm +g+w
.
./findutils_4.2.24-1_i386.deb
./findutils_4.2.25-1_i386.deb
./findutils_4.1.20-6_i386.deb
$ find . -perm /g+w
$

So with 4.2.24, the -perm +g+w output is clearly incorrect, since only
'.' and 'findutils_4.1.20-6_i386.deb' should be found.  And with -perm
/g+w it even finds NOTHING. :(

Then I built 4.2.25-1:

$ find --version
GNU find version 4.2.25
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
$ find . -perm +g+w
$ find . -perm /g+w
.
./findutils_4.1.20-6_i386.deb

So with 4.2.25, /g+w seems to work again, but +g+w is indeed broken,
or maybe it has been broken (at least for some forms of usage) for a
longer time already.

I now suspect this diff, "Fixed bug which caused find -perm /440 to be
treated the same as find -perm 440":
http://savannah.gnu.org/cgi-bin/viewcvs/findutils/findutils/find/parser.c.diff?r1=1.77&r2=1.78

But if I revert this patch, I simply get the other faulty behaviour of
4.2.24.  So it doesn't really solve anything.

It seems the change I mentioned earlier still has to do with this, as
the "+g+w" seems to be parsed as a POSIX compliant exact mode spec (so
it's using PERM_EXACT instead of PERM_ANY).

Attachment: pgpLMU6YxEflp.pgp
Description: PGP signature

Reply via email to