public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Possible bug: ssh-host-config - getent when computer name is "-" (dash)
@ 2016-03-24 14:12 Unknown Sender
  2016-03-24 15:43 ` Dirk Fassbender
  0 siblings, 1 reply; 6+ messages in thread
From: Unknown Sender @ 2016-03-24 14:12 UTC (permalink / raw)
  To: cygwin

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.

--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
  2016-03-24 14:12 Possible bug: ssh-host-config - getent when computer name is "-" (dash) Unknown Sender
@ 2016-03-24 15:43 ` Dirk Fassbender
  2016-03-24 21:45   ` cyg Simple
  0 siblings, 1 reply; 6+ messages in thread
From: Dirk Fassbender @ 2016-03-24 15:43 UTC (permalink / raw)
  To: cygwin

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.
>
> --
> 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
>
>
Hello,

the computer name "-" (dash) is illegal in the internet.
So many network utilities will have problems with this name.

See
https://en.wikipedia.org/wiki/Hostname
for a start about host name definitions.

Regards
Dirk Fassbender

--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
  2016-03-24 15:43 ` Dirk Fassbender
@ 2016-03-24 21:45   ` cyg Simple
  2016-03-24 21:49     ` Marco Atzeri
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: cyg Simple @ 2016-03-24 21:45 UTC (permalink / raw)
  To: cygwin

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.
>>
> Hello,
> 
> 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.

> See
> https://en.wikipedia.org/wiki/Hostname
> 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.

-- 
cyg Simple

--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
  2016-03-24 21:45   ` cyg Simple
@ 2016-03-24 21:49     ` Marco Atzeri
  2016-03-24 22:12     ` Erik Soderquist
  2016-03-24 23:20     ` Andrey Repin
  2 siblings, 0 replies; 6+ messages in thread
From: Marco Atzeri @ 2016-03-24 21:49 UTC (permalink / raw)
  To: cygwin

On 24/03/2016 22:45, cyg Simple wrote:
> 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).
>>>

>> See
>> https://en.wikipedia.org/wiki/Hostname
>> 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.

not as first letter

--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
  2016-03-24 21:45   ` cyg Simple
  2016-03-24 21:49     ` Marco Atzeri
@ 2016-03-24 22:12     ` Erik Soderquist
  2016-03-24 23:20     ` Andrey Repin
  2 siblings, 0 replies; 6+ messages in thread
From: Erik Soderquist @ 2016-03-24 22:12 UTC (permalink / raw)
  To: cygwin

On Thu, Mar 24, 2016 at 5:45 PM, cyg Simple wrote:
> > the computer name "-" (dash) is illegal in the internet.
>
> Uh, that isn't true.

Yes, it is true.

> > See
> > https://en.wikipedia.org/wiki/Hostname
> > 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.

The dash is permitted as _a_ character in a valid hostname, but is
explicitly prohibited as the first or last character.  Being that in
this scenario it is the only character, it violates the prohibition on
both first and last character.

I would change the computer name.

-- Erik

--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug: ssh-host-config - getent when computer name is "-" (dash)
  2016-03-24 21:45   ` cyg Simple
  2016-03-24 21:49     ` Marco Atzeri
  2016-03-24 22:12     ` Erik Soderquist
@ 2016-03-24 23:20     ` Andrey Repin
  2 siblings, 0 replies; 6+ messages in thread
From: Andrey Repin @ 2016-03-24 23:20 UTC (permalink / raw)
  To: cyg Simple, cygwin

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.
>>>
>> Hello,
>> 
>> 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.

>> See
>> https://en.wikipedia.org/wiki/Hostname
>> 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.

http://tools.ietf.org/html/rfc1034#section-3.5

<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,
Andrey Repin
Friday, March 25, 2016 02:04:28

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-24 23:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24 14:12 Possible bug: ssh-host-config - getent when computer name is "-" (dash) Unknown Sender
2016-03-24 15:43 ` Dirk Fassbender
2016-03-24 21:45   ` cyg Simple
2016-03-24 21:49     ` Marco Atzeri
2016-03-24 22:12     ` Erik Soderquist
2016-03-24 23:20     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).