[Bugs] #2152 UNSP: Registration fails if user name contains ":"

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Fri Oct 8 16:17:48 EDT 2010


#2152: Registration fails if user name contains ":"
------------------------------------------+---------------------------------
    Reporter:  bernie                     |          Owner:  anurag_seeta               
        Type:  defect                     |         Status:  closed                     
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar                      |        Version:  Git as of bugdate          
    Severity:  Unspecified                |     Resolution:  fixed                      
    Keywords:  dextrose sugar-love        |   Status_field:  Unconfirmed                
Distribution:  Unspecified                |      Seeta_dev:  Dipankar                   
------------------------------------------+---------------------------------
Changes (by martin.langhoff):

  * status:  assigned => closed
  * resolution:  => fixed


Old description:

> The schoolserver idmgr daemon passes the user name provided by Sugar
> directly to useradd to create new UNIX users.
>
> The character ":" isn't allowed in /etc/passwd and makes the registration
> fail (without providing a clear explanation given, this is another bug
> imho).
>
> For maximum version interoperability, I suggest *both* Sugar and the XS
> should convert illegal characters to "_".

New description:

 The schoolserver idmgr daemon passes the user name provided by Sugar
 directly to useradd to create new UNIX users.

 The character ":" isn't allowed in /etc/passwd and makes the registration
 fail (without providing a clear explanation given, this is another bug
 imho).

 For maximum version interoperability, I suggest *both* Sugar and the XS
 should convert illegal characters to "_".

 There is no "schoolserver" component so left it as 'Sugar'.

--

Comment:

 Right -- for a moment I worried that we were missing out on some input
 sanitization but that's not the case. Not only Bobby Tables, but Bobby
 Backticks and friends all register ok. Only bobby Smiley fails, because
 ':' is the filed separator in /etc/passwd and there is no escape sequence
 for it.

 This gets cured with
 http://dev.laptop.org/git/projects/idmgr/commit/?id=2384a1b0b578c3fc9eeaa5e8b7d9c1617ca9f0eb
 which just removes it.

 Which is rolled in a nice idmgr rpm for the 0.6 series.

   yum --enablerepo=olpcxs-testing install idmgr

 should bring idmgr-0.7.22 (or newer).

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/2152#comment:15>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list