[tpop3d-discuss] auth_mysql problem

Tomasz Matuszewski thom at artcom.pl
Sat, 6 Sep 2003 20:39:02 +0200


On Sat,  6 September 2003 at 14:48:56 +0200, Jakob Hirsch wrote:
> Tomasz Matuszewski wrote:
>=20
> > mysql, but hash is of incorrect length 23 (expecting 8 or 16)
>=20
> wow, seems that nobody ever user mysql password hashes (since I don't t=
hink
> the code for it has ever changed).
> This patch fixes it:
>=20
> --- tpop3d-1.5.1/password.c     Tue Jul 15 01:31:20 2003
> +++ tpop3d-1.5.1-2/password.c   Sat Sep  6 14:45:27 2003
> @@ -258,7 +258,7 @@
>          mysql_make_scrambled_password(hash, pass);
>          /* The MySQL password format changed, and we should accept eit=
her a
> 16-
>           * or 8-character long hash. */
> -        switch (n =3D strlen(pwhash)) {
> +        switch (n =3D strlen(realhash)) {
>              case 8:
>                  return strncmp(hash, realhash, 8) =3D=3D 0;
>=20
>=20
> -------- Thus wrote Jakob Hirsch --------
thx, now all works great!
--=20
Tomasz Matuszewski, thom@artcom.pl, gg: 895856, tel: +48(605)052-627
"Jeden anio=B3 nie spe=B3nia dw=F3ch poselstw." Talmud