Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Michael Stone

On Thu, May 17, 2018 at 05:21:34PM +0200, Ferenc Wágner wrote:

Michael Stone  writes:

On Thu, May 17, 2018 at 04:15:44PM +0200, you wrote:


Michael Stone  writes:


It would not--POSIX does not disallow the . syntax.


(This is not my point, but in my reading
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html
does not allow it: "The BSD syntax user[. group] was changed to user[:
group] in this volume of POSIX.1-2017...")


The new syntax was introduced.


No new syntax was introduced, "the BSD syntax was *changed*".  But this
isn't from the normative section, so nevermind.


BSD != POSIX. At one point the standard mandated the original BSD 
syntax, then the standard changed to mandate a new syntax. In all cases 
POSIX specifies a *subset* of behavior of standard utilities, so 
anything that isn't expressly forbidden is simply undefined; 
POSIX-compliant implementations are required to support the new syntax, 
but nothing is said about supporting the old syntax. The lines you keep 
quoting are there to explain the rationale for why the new syntax was 
invented, nothing more.



It does not say anything like "MUST NOT accept . syntax".


Nor like MUST NOT accept ! syntax or % syntax or @ syntax or ..:)


Correct, those would all be valid (though unlikely to be implemented 
because there isn't a reason to do so).



Rather, I meant that adduser could be configured *by default* to not
require --force-badname for adding perfectly valid POSIX user names.


It can be, someone's simply decided not to. I think that's dumb, but
¯\_(ツ)_/¯


OK, I'll link our discussion into #604242 to see if anything can change
now.


FWIW, debian seems to be fairly unique in deciding that dot-names can't 
be supported. They work just fine by default on fedora, openbsd, etc., 
all of which support the legacy chown syntax without all this 
hand-wringing...


Mike Stone



Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Ferenc Wágner
Michael Stone  writes:

> On Thu, May 17, 2018 at 04:15:44PM +0200, you wrote:
>
>> Michael Stone  writes:
>>
>>> It would not--POSIX does not disallow the . syntax.
>>
>> (This is not my point, but in my reading
>> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html
>> does not allow it: "The BSD syntax user[. group] was changed to user[:
>> group] in this volume of POSIX.1-2017...")
>
> The new syntax was introduced.

No new syntax was introduced, "the BSD syntax was *changed*".  But this
isn't from the normative section, so nevermind.

> It does not say anything like "MUST NOT accept . syntax".

Nor like MUST NOT accept ! syntax or % syntax or @ syntax or ..:)

>> Rather, I meant that adduser could be configured *by default* to not
>> require --force-badname for adding perfectly valid POSIX user names.
>
> It can be, someone's simply decided not to. I think that's dumb, but
> ¯\_(ツ)_/¯

OK, I'll link our discussion into #604242 to see if anything can change
now.
-- 
Thanks,
Feri



Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Michael Stone

On Thu, May 17, 2018 at 04:15:44PM +0200, you wrote:

Michael Stone  writes:

It would not--POSIX does not disallow the . syntax.


(This is not my point, but in my reading
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html
does not allow it: "The BSD syntax user[. group] was changed to user[:
group] in this volume of POSIX.1-2017...")


The new syntax was introduced. It does not say anything like "MUST NOT 
accept . syntax".



Rather, I meant that adduser could be configured *by default* to not
require --force-badname for adding perfectly valid POSIX user names.


It can be, someone's simply decided not to. I think that's dumb, but 
¯\_(ツ)_/¯



Yes.  However, chown one.two.three can still behave unexpectedly if
the "three" group and the "one.two" and "one.two.three" users all exist.
(I understand that the behavior is well defined anyway.)


There are all kinds of things that can be unexpected on a linux system 
if you try hard enough. We don't stop you from creating filenames with 
shell special characters, either. 


Mike Stone



Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Ferenc Wágner
Michael Stone  writes:

> On Thu, May 17, 2018 at 02:56:00PM +0200, Ferenc Wágner wrote:
>
>> When asked to enable user names containing dots, I encountered
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604242#20.
>> When do you think chown could stop accepting the dot separator?
>
> No
>
>> While it could break old scripts 
>
> that's why
>
>> it would also enhance Debian's POSIX conformance.
>
> It would not--POSIX does not disallow the . syntax.

(This is not my point, but in my reading
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html
does not allow it: "The BSD syntax user[. group] was changed to user[:
group] in this volume of POSIX.1-2017...")

Rather, I meant that adduser could be configured *by default* to not
require --force-badname for adding perfectly valid POSIX user names.
I shouldn't have used the word "conformance" for this.

> Note that the discussion in 604242 is wrong: coreutils will only fall
> back to the . syntax *if there is a . which is not in a valid
> username*. Usernames with .'s will work perfectly well as-is.

Yes.  However, chown one.two.three can still behave unexpectedly if
the "three" group and the "one.two" and "one.two.three" users all exist.
(I understand that the behavior is well defined anyway.)
-- 
Regards,
Feri



Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Michael Stone

On Thu, May 17, 2018 at 02:56:00PM +0200, Ferenc Wágner wrote:

When asked to enable user names containing dots, I encountered
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604242#20.
When do you think chown could stop accepting the dot separator?


No

While it could break old scripts 


that's why


it would also enhance Debian's POSIX conformance.


It would not--POSIX does not disallow the . syntax.

Note that the discussion in 604242 is wrong: coreutils will only fall 
back to the . syntax *if there is a . which is not in a valid username*. 
Usernames with .'s will work perfectly well as-is.


Mike Stone



Bug#898921: chown: please consider dropping the dot separator fallback

2018-05-17 Thread Ferenc Wágner
Package: coreutils
Version: 8.26-3
Severity: wishlist

Dear Maintainer,

When asked to enable user names containing dots, I encountered
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604242#20.
When do you think chown could stop accepting the dot separator?
While it could break old scripts (only : is documented for quite
some time now), it would also enhance Debian's POSIX conformance.
-- 
Thanks,
Feri.