[CF-Devel] MD5 crypt in FreeBSD
Joris Bontje
jbontje at suespammers.org
Fri Nov 17 08:31:02 CST 2000
On 17 Nov 2000, at 1:35, Joris Bontje wrote:
>
Problem:
>
When an existing user logs in with username and password:
>
"Wrong Password!", Trying to create a new user: "The passwords
>
did not match."
>
>
[big cut]
>
>
Fix:
>
-- insert here :) --
>
I did a quick and dirty fix, works for me but probably not on
something other than FreeBSD.
Solution use libdes:
->replace -lcrypt with -ldes
->replace #include <crypt.h> with #include <des.h>
->replace crypt(s,p) with des_crypt(s,p)
Patchfile is attached. Maybe someone with more C know-how can
include this with some nice #ifdef 's
Joris Bontje
---
The suespammers.org mail server is located in California;
do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address
-------------- next part --------------
--- server/Makefile.old Fri Nov 17 15:08:29 2000
+++ server/Makefile Fri Nov 17 14:57:38 2000
@@ -80,7 +80,7 @@
INCLUDES= $(EXTRA_INCLUDES) -I../include -I$(srcdir)/../include
-LIBS = -lm -lcrypt $(EXTRA_LIBS)
+LIBS = -lm -ldes $(EXTRA_LIBS)
SHELL = /bin/sh
--- server/main.c.old Fri Nov 17 15:10:09 2000
+++ server/main.c Fri Nov 17 14:58:07 2000
@@ -27,7 +27,7 @@
*/
#ifdef HAVE_CRYPT_H
-#include <crypt.h>
+#include <des.h>
#endif
#include <version.h>
@@ -146,7 +146,7 @@
else
s[0]= salt[0],
s[1]= salt[1];
- return (char*)crypt(str,s);
+ return (char*)des_crypt(str,s);
}
int check_password(char *typed,char *crypted) {
More information about the crossfire
mailing list