[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #38474] Unintended (?) behaviour change of -perm +mode predicate
From: |
Ludovic Brenta |
Subject: |
[bug #38474] Unintended (?) behaviour change of -perm +mode predicate |
Date: |
Sat, 20 Apr 2013 15:16:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12 |
Follow-up Comment #4, bug #38474 (project findutils):
James, the clause of the POSIX standard you mention is not relevant to this
case because the mode was given in octal, not symbolic form. The relevant
clause is:
-perm [-]onum
If the hyphen is omitted, the primary shall evaluate as true when the file
permission bits exactly match the value of the octal number onum and only the
bits corresponding to the octal mask 07777 shall be compared. (See the
description of the octal mode in chmod().) Otherwise, if onum is prefixed by a
hyphen, the primary shall evaluate as true if at least all of the bits
specified in onum that are also set in the octal mask 07777 are set.
I take this to mean that "-perm +0100" is in fact unspecified. Thus:
"-perm u+x", "-perm u=x" and "-perm 0100" match if and only if the file
permissions are exactly --x------.
"-perm +u+x" and "-perm -0100" match if the file permissions are anything of
the form ??x??????.
"-perm +0100" is unspecified and, as far as I understand, a syntax error.
Presumably, find should reject such an argument.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38474>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Andreas Metzler, 2013/04/07
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Andreas Metzler, 2013/04/07
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, James Youngman, 2013/04/20
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate,
Ludovic Brenta <=
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Eric Blake, 2013/04/20
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Eric Blake, 2013/04/20
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Paul Eggert, 2013/04/21
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, James Youngman, 2013/04/22
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Eric Blake, 2013/04/22
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Paul Eggert, 2013/04/22
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, James Youngman, 2013/04/24
- [bug #38474] Unintended (?) behaviour change of -perm +mode predicate, Paul Eggert, 2013/04/24