This is the mail archive of the
mailing list for the Cygwin project.
Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: cyg Simple <cygsimple at gmail dot com>, cygwin at cygwin dot com
- Date: Fri, 25 Mar 2016 02:16:34 +0300
- Subject: Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
- Authentication-results: sourceware.org; auth=none
- References: <trinity-e5b0769d-61d9-4ca8-9820-6997056dc6a2-1458828746171 at 3capp-mailcom-lxa02> <56F40B07 dot 2020400 at arcor dot de> <56F46003 dot 2060704 at gmail dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, cyg Simple!
> On 3/24/2016 11:43 AM, Dirk Fassbender wrote:
>> Am 24.03.2016 um 15:12 schrieb Unknown Sender:
>>> I noticed this bug for the first time today on a computer that has the
>>> computer name "-" (dash).
>>> During ssh-host-config:
>>> *** Query: Do you want to use a different name? (yes/no) no
>>> /usr/bin/getent: invalid option -- '+'
>>> Try `getent --help' or `getent --usage' for more information.
>>> *** Query: Create new privileged user account '-\cyg_server' (Cygwin
>>> name: 'cyg_server')? (yes/no) yes
>>> I suspect this has to do with the computer name because getent &
>>> ssh-host-config have never failed this way for me before. Moreover
>>> getent seems to be able to query the computer name, and the error
>>> message makes me think that it may be connected.
>>> I included the 2nd query just to show that it continued the process
>>> after the error occurred. I'm not sure if this error is going to cause
>>> problems down the line.
>>> Will I be encountering tons of problems with a computer name of "-"?
>>> It seems to only be a problem right here & right now.
>> the computer name "-" (dash) is illegal in the internet.
> Uh, that isn't true.
>> So many network utilities will have problems with this name.
> This might be true but doesn't invalidate the use of the hyphen.
>> for a start about host name definitions.
> From this reference:
> "The Internet standards (Requests for Comments) for protocols mandate
> that component hostname labels may contain only the ASCII letters 'a'
> through 'z' (in a case-insensitive manner), the digits '0' through '9',
> and the hyphen ('-'). The original specification of hostnames in RFC
> 952, mandated that labels could not start with a digit or with a hyphen,
> and must not end with a hyphen."
> Note that hyphen (a.k.a. dash) is permitted.
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9
Even if http://tools.ietf.org/html/rfc2181#section-11 somewhat contradicts to
it, it still makes a strong case for interoperability.
With best regards,
Friday, March 25, 2016 02:04:28
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple