On Feb 16 18:40, Corinna Vinschen wrote: > On Feb 16 09:15, Brian Inglis wrote: > > On 2019-02-16 08:33, Corinna Vinschen wrote: > > > On Feb 16 08:09, Brian Inglis wrote: > > >> On 2019-02-16 02:45, Corinna Vinschen wrote: > > >>> On Feb 15 14:51, Bill Stewart wrote: > > >>>> On Fri, Feb 15, 2019 at 2:38 PM Brian Inglis wrote: > > >>>>> Windows normally allows "." to be used to refer to the local machine > > >>>>> name in a > > >>>>> domain context - can anyone confirm or deny whether this works in > > >>>>> Cygwin or with > > >>>>> getent? > > >>>> AFAICT, the "." shortcut does not work in Cygwin. > > >>> The combining operator for domain prepended usernames is '+'. This > > >>> is the same character as used by good old Interix for the same purpose. > > >> That was not in question - the question was could .+$USER be used in > > >> lieu of > > >> $COMPUTERNAME+$USER or $HOSTNAME+$USER and should $COMPUTERNAME rather > > >> than > > >> $HOSTNAME be used in such contexts? > > > Yeah, I misunderstood this, sorry. The answer is no. The username is > > > fixed. Otherwise you'd have two auto-generated passwd entries for the > > > same user which may lead to confusion (not necessarily confusion on the > > > user side...) > > > If this is a desired feature, we could try this, but it might break > > > existing setups again. > > > > As with .\$USER in Windows or with ~ for $HOME, this should only be a > > convenience to allow input or scripts to avoid providing > > $COMPUTERNAME/$HOSTNAME > > in userid command line argument contexts. > > I added this to Cygwin for testing so you can simply use ".+username" as > a shortcut for "$COMPUTERNAME+username". > > I uploaded snapshots to https://cygwin.com/snapshots for playing.
After some mulling, this is a bad idea. It potentially allows to circumvent OpenSSHs user/group name matching again, unless the Admin knows to add every local user twice, e.g. Match user MACHINE+user,.+user or use patterns: Match user *+user I'll revert the patch again. Corinna -- Corinna Vinschen Cygwin Maintainer
signature.asc
Description: PGP signature