Many thanks to you!!!
It now works (did'nt realize that strings where not null
terminated) stupid me!!!
Regards,
On Sat, 28 Apr 2001, mlw wrote:
> You actually almost have it right.
>
> You are passing VARDATA(user) to crypt, this is wrong.
>
> You must do something like this:
>
> int ulen =
You actually almost have it right.
You are passing VARDATA(user) to crypt, this is wrong.
You must do something like this:
int ulen = VARSIZE(user)-VARHDRSZ;
char utmp[ulen+]; // This works in newer GCC, cool.
memcpy(utmp,VARDATA(user), len);
utmp[ulen]=0;
crypted=crypt(utmp,salt);
Strings are