Hi

Thanks for the patch.

I agree.

Regards,

// Ola

On Fri, Aug 18, 2006 at 06:46:33PM +0200, Miroslav Kure wrote:
> Package: vserver-debiantools
> Version: 0.2.9
> Severity: minor
> Tags: patch
> 
> Hi,
> 
> the newvserver script has the following check for hostname:
> 
> case "$2" in
>    *[a-z0-9]*[a-z0-9_-][a-z]*[a-z0-9_-]*[a-z0-9])
> 
> That does not allow names < 5 characters even if they are perfertly
> valid. (Think vservers named after services: pbx, ftp, www.)
> 
> RFC 952 says:
> 
>  A "name" (Net, Host, Gateway, or Domain name) is a text string up to
>  24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign
>  (-), and period (.).  Note that periods are only allowed when they
>  serve to delimit components of "domain style names". No blank or
>  space characters are permitted as part of a name. No distinction is
>  made between upper and lower case.  The first character must be an
>  alpha character.  The last character must not be a minus sign or
>  period. Single character names or nicknames are not allowed.
> 
> RFC 1123 updates:
> 
>  The syntax of a legal Internet host name was specified in RFC-952.
>  One aspect of host name syntax is hereby changed: the restriction on
>  the first character is relaxed to allow either a letter or a digit.
>  Host software MUST support this more liberal syntax.  Host software
>  MUST handle host names of up to 63 characters and SHOULD handle host
>  names of up to 255 characters.
> 
> As the script is using explicitely #!/bin/bash and has extblob
> enabled, I would recommend the following match:
> 
>  [a-z0-9]*([a-z0-9_-])[a-z0-9]
> 
> As a matter of fact, the same is true for the newnfsvserver and
> stripserver scripts.
> 
> -- 
> Miroslav Kure
> 
> 

-- 
 --------------------- Ola Lundqvist ---------------------------
/  [EMAIL PROTECTED]                     Annebergsslingan 37      \
|  [EMAIL PROTECTED]                 654 65 KARLSTAD          |
|  +46 (0)54-10 14 30                  +46 (0)70-332 1551       |
|  http://www.opal.dhs.org             UIN/icq: 4912500         |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to