On 12 Jun 1999, Niels [ISO-8859-1] Möller wrote:
> Thanks, I'll look into that. But right now I'm a little confused; at
> first I suspected that md5 was supported only by PAM but not by libc,
> and that's why the good old crypt()-based verification didn't work.
>
> But reading the glibc documentation, plain crypt() *should* handle
> md5, so I guess I'm doing something stupid. Perhaps I have to
> NUL-terminate the salt argument after the $ that terminates the salt?
> I currently pass the pw_passwd-field as salt, without any
> modifications. That used to work, and it has the advantage that I
> don't need to know about the internals of encrypted passwords: in
> particular I don't need to know where the salt ends.
md5 passwords are handled by glibc2 transparently (and libc5 since 5.4.42
or something), so just calling crypt() with the whole encrypted
password should work. At least it worked for me on Debian/i386 with glibc
2.0 and glibc 2.1.
--
Madarasz Gergely [EMAIL PROTECTED] [EMAIL PROTECTED]
It's practically impossible to look at a penguin and feel angry.
Egy pingvinre gyakorlatilag lehetetlen haragosan nezni.
HuLUG: http://mlf.linux.rulez.org/