# crypt()ic problem

H. Peter Anvin (hpa@trantor.zytor.com)
Tue, 11 Jun 1996 19:36:14 PDT

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

    Followup to:  <Pine.BSF.3.91.960610141621.28645C-100000@srv1.thuntek.net>
    By author:    "Jamal A. Wills" <jwills@thuntek.net>
    In newsgroup: local.moo
    >=20
    > I think this system has a slightly nonstandard form of crypt().  If I=20
    > change candidate.password[1..2] to candidate.password[4..5] I think it=20
    > should work, but I wanted to check with someone more familier with the=20
    > language first (especially since this would make the code incompatable=20
    > with other servers).
    >=20

    The [1..2] part is actually bogus, it just happens to work on standard
    UNIX crypt().

    The correct form is actually:

    if ( crypt(guess, password) =3D=3D crypt(password, password) ) then
    ...

    where "guess" is what the user typed in and password is the stored
    encrypted password.

    	-hpa
    --=20
    PGP public key available - finger hpa@zytor.com
    "The earth is but one country, and mankind its citizens."  --  Bah=E1'u'l=
    l=E1h
    Just Say No to Morden * Save Babylon 5: http://www.babylon5.com/cmp/suppo=
    rt/
    The cat is out of the bag - Linux 2.0 is available!