OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Robert Bihlmeyer (robbeORCUS.PRIV.AT)
Date: Thu Feb 15 2001 - 06:51:43 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    gabriel rosenkoetter <grECLIPSED.NET> writes:

    > Perhaps mine was not the most thought-out reply, but people who use
    > usernames longer than 8 characters should be aware that those
    > usernames are NOT unique under POSIX, and useradd programs that
    > allow them are at least *also* broken.

    So? Programs using features that are optional under POSIX (i.e. not
    required to be present on a POSIX-compliant system) are of course not
    broken.

    You say that on a system supporting 32 character usernames, "useradd"
    should refuse to add names longer than 8 characters? A warning would
    be ok, perhaps.

    Note that a decent frontend will surely check for the one problem you
    raise (which is not restricted to long usernames): uniqueness.

    So, if a user "eightchr" exists, adding another user "eightchr" should
    fail (otherwise I concur that the useradd in question is broken).
    Adding "eightchrsareenough" will automatically fail with "user exists"
    on systems considering only the first 8 charactars, and will magically
    work otherwise. No problem here.

    > (No question that cron should do better bounds checking; my point
    > was that that bounds checking should be added out of paranoia, not
    > out of necessity.)

    A fix IS necessary for correctness, not paranoia. Systems supporting
    9, 32, or 1024 characters in usernames are entirely compliant with
    relevant standards, and crontab has certainly no excuse on segfaulting
    over this. Bailing out is the least it must do. Deal with any length
    it should.

    --
    Robbe
    

    -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org

    iD4DBQE6i9D48g21h7wYWrMRAgmqAKDDk0WmSnwLgx5GVv/xflnIfbce2QCWNDzr h1c93dPO7FO9hfQ4xwpGaA== =HOJ+ -----END PGP SIGNATURE-----