On Wed, Mar 31, 2010 at 09:11:54AM +0200, ydir...@free.fr wrote:
> Selon Ola Lundqvist <o...@debian.org>:
> 
> > merge 575367 409862
> > thanks
> >
> > Hi Yann
> >
> > On Thu, Mar 25, 2010 at 10:06:20AM +0100, Yann Dirson wrote:
> > > Package: vserver-debiantools
> > > Version: 0.6.4
> > >
> > > # newvserver --hostname a [...]
> > > newvserver error: --hostname must be a hostname for the vserver
> > >
> > > looking at what could be wrong with one-char hostnames, I am still
> > > puzzled by the expression used with the "case" which deals with
> > > hostname parsing.
> > >
> > > If you insist on doing such a check (ie. you
> > > really feel "[a-z0-9]*([a-z0-9_])" is not enough), why not using
> > > "[a-z0-9]?(*([a-z0-9_])[a-z0-9])" ?
> >
> > Because then you can define the hostname '_a' which is not a valid
> > hostname.
> 
> No, this is a sequence of mandatory "[a-z0-9]" and optional
> "*([a-z0-9_])[a-z0-9]" using "?(...)".

Thanks for clarification. I was not aware of that construct.
 
> > Also with this definition you can not have the hostname
> > 'test-host' as you have forgotten the '-' character.
> 
> Right, I meant "[a-z0-9]?(*([a-z0-9_-])[a-z0-9])"

Ok.

> > But if you add that it causes other problems.
> >
> > In any case you can see a more lengthy discussion at
> > bugs.debian.org/409862 about this issue. I have not yet got a
> > really good check description for this. It is close but not perfect.
> 
> I'll see if I find time to read it.  But at first glance I can't understand 
> why
> it would be a problem, and why the debian tools would need to be more strict
> than the basic vserver tools.

It is because this information is put into other things
(at least was that historically) so that is why we have input
sanitizing.

I think your suggestion has passed my tests, so I should simply
add it when I get enough time.

Best regards,

// Ola

> 
> 

-- 
 --------------------- Ola Lundqvist ---------------------------
/  o...@debian.org                     Annebergsslingan 37      \
|  o...@inguza.com                      654 65 KARLSTAD          |
|  http://inguza.com/                  +46 (0)70-332 1551       |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---------------------------------------------------------------



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to