Geoff Clare wrote, on 19 Aug 2020:
>
> > ---------------------------------------------------------------------- 
> >  (0004926) geoffclare (manager) - 2020-08-19 09:22
> >  https://austingroupbugs.net/view.php?id=1392#c4926 
> > ---------------------------------------------------------------------- 
> 
> > I think we should issue a "standard is silent" interpretation, thus
> > allowing both behaviours for Issue 7, but we should make a change in Issue
> > 8 to require the BSD behaviour. 
> 
> I started looking into a wording change for this, but I'm not too
> keen on where it would end up. It would have a particular difference
> from chmod that would "stick out like a sore thumb", which is that
> when '=' is used without a "who", find ignores the umask but chmod
> uses it.
> 
> Is that what BSD find does?  Or is it consistent with chmod here
> (contrary to what the standard requires)?

This got answered via a bug note (4941): macOS (which uses BSD find)
is consistent with chmod.

> Perhaps we should allow the difference but recommend against it.

I think I would prefer just to require consistency with chmod in Issue 8.
The difference from chmod violates the principle of least surprise.

Another reason to disallow ignoring the umask for '=' without a "who"
is that this makes it identical to 'a=', thus reducing the available
functionality for no reason.

I propose:

    The <i>mode</i> argument is used to represent file mode bits. It shall
    be processed in an identical matter to the <i>symbolic_mode</i> operand
    described in <i>chmod</i>, except that:

    1. The changes to file mode bits shall be applied to a template instead
       of to any files.  The template shall initially have all file mode
       bits cleared.

    2. The <i>op</i> symbol '-' cannot be the first character of <i>mode</i>;
       this avoids ambiguity with the optional leading <hyphen-minus>. Since
       the initial mode is all bits off, there are not any symbolic modes
       that need to use '-' as the first character.

    If the <hyphen-minus> is omitted, ...

with a new paragraph in RATIONALE:

    Earlier versions of this standard were silent regarding whether the
    <b>-perm</b> primary takes into account the file mode creation mask
    when the <i>op</i> symbols '+' and '-' are used without <b>who</b>
    being specified, and required the mask to be disregarded when the
    <i>op</i> symbol '=' is used without <b>who</b>.  The latter resulted
    in a surprising inconsistency with <i>chmod</i>, and also meant that
    '=' without <b>who</b> just worked the same as '=' with a <b>who</b>
    of 'a', disallowing useful functionality.  Some implementations used
    the mask anyway, despite the requirement not to. The standard now
    requires that the way <i>find</i> handles these <i>op</i> symbols is
    consistent with <i>chmod</i>.  Applications that need the old behavior
    can simply use '=' with a <b>who</b> of 'a' instead of without
    <b>who</b>.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
      • Re:... Geoff Clare via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
          • ... Joerg Schilling via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to