]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_dhx_passwd.c
Merge master
[netatalk.git] / etc / uams / uams_dhx_passwd.c
index a6a600ed496bca8e2bb35f31c68bdd36e4eca1bc..d390f76b4da29d556fb07bdf559849e3610e9362 100644 (file)
@@ -8,12 +8,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef NETBSD
-#define _XOPEN_SOURCE 500 /* for crypt() */
-#endif
-#ifdef FREEBSD
-#define _XOPEN_SOURCE /* for crypt() */
-#endif
+#include <atalk/standards.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,6 +20,7 @@
 #include <sys/time.h>
 #include <time.h>
 #include <pwd.h>
+#include <arpa/inet.h>
 
 #ifdef SHADOWPW
 #include <shadow.h>
@@ -58,7 +54,7 @@
 /* the secret key */
 static CAST_KEY castkey;
 static struct passwd *dhxpwd;
-static u_int8_t randbuf[16];
+static uint8_t randbuf[16];
 
 #ifdef TRU64
 #include <sia.h>
@@ -73,14 +69,14 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
                        char *rbuf, size_t *rbuflen)
 {
     unsigned char iv[] = "CJalbert";
-    u_int8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
+    uint8_t p[] = {0xBA, 0x28, 0x73, 0xDF, 0xB0, 0x60, 0x57, 0xD4,
                    0x3F, 0x20, 0x24, 0x74, 0x4C, 0xEE, 0xE7, 0x5B };
-    u_int8_t g = 0x07;
+    uint8_t g = 0x07;
 #ifdef SHADOWPW
     struct spwd *sp;
 #endif /* SHADOWPW */
     BIGNUM *bn, *gbn, *pbn;
-    u_int16_t sessid;
+    uint16_t sessid;
     size_t i;
     DH *dh;
 
@@ -249,7 +245,7 @@ static int passwd_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
 {
     char       *username;
     size_t     len, ulen;
-    u_int16_t  temp16;
+    uint16_t  temp16;
 
     *rbuflen = 0;
     
@@ -279,7 +275,7 @@ static int passwd_logincont(void *obj, struct passwd **uam_pwd,
 #endif /* SHADOWPW */
     unsigned char iv[] = "LWallace";
     BIGNUM *bn1, *bn2, *bn3;
-    u_int16_t sessid;
+    uint16_t sessid;
     char *p;
     int err = AFPERR_NOTAUTH;