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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=kgqh+OubYl4KHS0z BwMHVTL/pfaHLw8DfmLdfA29Knb8+0gZIVOOhmwkIDhad+QEmMPYiOBwQsgcvCfh sC/f2bVnu7TmywVw6ncTHAyKZnBlgW11mnyNSkyVssLGv8NN0hy/Tj+3c2Ih0r6C 2Ng1z/iIDyMcXr3TZ7k/m7zc9kU= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=/CBpRFzN8gM4fP6frrzqfI xjcYg=; b=rIHtMTidSo0vHlaS+LoN7UY1XXfFwVzb7Y/0ztc+zMO0WCHTf8s/RL Z0Mc5/uwSE9cweWvqia08FqZiZUXMcovqxmhpwSc8V2OMJDbjIpRBy06HkCuAHgh bBpgYnxpQxxlg090vPw/F7Qt4Lytf3RvfJSpTm+P0iV7c3YaX2sEE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Sun, 13 Apr 2014 14:27:33 +0400 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <535719170.20140413142733@yandex.ru> To: Eric Blake , cygwin AT cygwin DOT com Subject: Re: Still testing needed: New passwd/group AD/SAM integration In-Reply-To: <5346FCF9.5000908@redhat.com> 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> <5346FCF9 DOT 5000908 AT redhat DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Eric Blake! >> 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. >> >> 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 >> portable across systems conforming to POSIX.1-2008, the value is composed >> of characters from the portable filename character set. The >> character 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#tag_18_06_01 >> If none of the characters in the tilde-prefix are quoted, the characters >> in the tilde-prefix following the are treated as a possible login >> name from the user database. A portable login name cannot contain >> characters outside the set given in the description of the LOGNAME >> environment variable in XBD Other Environment Variables. > and following that link: >> For a value of LOGNAME to be portable across implementations of >> POSIX.1-2008, 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. This is all nice and dandy, but user _name_ (logon name) in Windows is as strict, as POSIX mandates (down to character set limitations), the domain prefix is only used, when you absolutely need to specify it, and it is not an integral part of the name. > 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. This is a grey area. Shell macros is only available is the shell prompt itself and scripts executed by this shell. And is not portable at all. -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 13.04.2014, <14:22> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple