delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/10/17:13:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=GKU3+y
Dy26xCsgUQBiHa5kARvGwt7Ll4HzqUt3W3Bx5vlBhHYMCxkHgT4gejwMhBWsMLoV
6oEYFQNgFjAUMVW2zJyL7ow76Y8L8Fn5dsZldcqpRIbJR4wYsWFP+0oZZyKrJ/Il
Y/qyZZ1UMx6e2Zlo4s1ueCiifK4FlcreQGoNw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; s=default; bh=FLtaGRtSyHA5
jK3/bJU853mE41I=; b=UOXO3OGxWG/vEZS9r0FQ9LGyHW78kx0zkZLW3+EiYj8W
MLdmL9aIVBN6ADcBb1DjHcOPtPx3853JB3iJ6gKygOPARp5qnHWvR9JVFl/WIxmC
eT4oIqlL9b4SpluwnVYWXT1mJppv7nwK92Ef2VTCmgkEUU4EPpp42sPpckNXdmw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Message-ID: <5346FCF9.5000908@redhat.com>
Date: Thu, 10 Apr 2014 14:20:09 -0600
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Still testing needed: New passwd/group AD/SAM integration
References: <20140410145323 DOT GB2437 AT calimero DOT vinschen DOT de> <5346B667 DOT 3040704 AT breisch DOT org> <20140410152809 DOT GD2437 AT calimero DOT vinschen DOT de> <5346E55D DOT 6020405 AT etr-usa DOT com> <20140410190424 DOT GK2437 AT calimero DOT vinschen DOT de>
In-Reply-To: <20140410190424.GK2437@calimero.vinschen.de>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
X-IsSubscribed: yes

--j4NvThMumNSgWfr4HbhJlqpTs6Rao2WP3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 04/10/2014 01:04 PM, Corinna Vinschen wrote:

>=20
> A local cygwin user told me that the users in their company would
> probably be confused by the '+ or, FWIW, any other non-backslash char,
> because they were drilled to see and use usernames always in domain\name
> form, or even in domain\\user form when logging in to Linux.
>=20
> I like slashes a lot more for obvious reasons.  But maybe, and that
> wouldn't be too hard to implement, we could accept account names with
> slash and with backslash, just as we do with pathnames.  Output of
> usernames would be with slashes, of course.

POSIX says:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html
> User Name
> A string that is used to identify a user; see also User Database. To be p=
ortable across systems conforming to POSIX.1-2008, the value is composed of=
 characters from the portable filename character set. The <hyphen> characte=
r should not be used as the first character of a portable user name.

It also says this for shell tilde expansion:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#ta=
g_18_06_01
>  If none of the characters in the tilde-prefix are quoted, the characters=
 in the tilde-prefix following the <tilde> are treated as a possible login =
name from the user database. A portable login name cannot contain character=
s outside the set given in the description of the LOGNAME environment varia=
ble in XBD Other Environment Variables.

and following that link:
> For a value of LOGNAME to be portable across implementations of POSIX.1-2=
008, the value should be composed of characters from the portable filename =
character set.

In short, in POSIX systems, user names are solely from the set
[-_.a-zA-Z0-9]; which excludes +, \, or any other separator we come up
with.  I'm fine with using a non-portable character (this is, after all,
a cygwin extension of how to map Windows user names to a Linux emulation
environment).  But keeping in mind the rules on tilde expansion,

~a+b/file

can undergo tilde expansion for username 'a+b', but

~a\\b/file

cannot do so, because the \ is necessarily always quoted.  There is no
way to get tilde expansion to work for a username containing a shell
metacharacter, which frowns on quite a few otherwise useful characters,
including \.

Worse, the thought of using / as the separator gives me the willies - it
is BOUND to go wrong.  The expression

~a/b/file

is NOT requesting 'file' within user 'a/b's home, but 'b/file' within
user 'a's home.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--j4NvThMumNSgWfr4HbhJlqpTs6Rao2WP3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJTRvz5AAoJEKeha0olJ0NqbqQH/2k8g7KA4GoRX0O75A3p76Y3
ZT5UgRCfRIxLmw4id4foBBSga+yHbUZsev+Nfpwbcg1fSiGhrG4TJ7SqvkvqzTvB
LzsTXQErPuejzwh/QesJnxXlMMDOQJTFuNsD4YnPTJ2QdAkuDzdS7YmZYciVOgfj
WDiiHhO4EZtfdBSrvZxRhNcGLRMbYDFgRxAOMH7Hb9qo+5vYWLf6hSONh4/8ikb2
e8zzR5tgExP9PMcuXPQy1M7ThqKi1jwQ3aVjpLOVPovmyxCVBses8Ly89W1bHW0e
Gne4GRhNa1CaMj+K8i4ItplnUKzhxN1he891MtzwtOg4WOUnmNZZni10Zaz8xPA=
=rxmA
-----END PGP SIGNATURE-----

--j4NvThMumNSgWfr4HbhJlqpTs6Rao2WP3--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019