]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_pgp.c
Merge master
[netatalk.git] / etc / uams / uams_pgp.c
index 03670c298de948f0d0cb291704d42248c4369b4a..9b9c1d801dd57d53c543d8cdc1e11fb555f18f05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pgp.c,v 1.11 2005-04-28 20:49:50 bfernhomberg Exp $
+ * $Id: uams_pgp.c,v 1.12 2009-10-15 11:39:48 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -12,8 +12,8 @@
 
 #ifdef UAM_PGP
 
-/* for crypt() */
-#define _XOPEN_SOURCE
+#include <atalk/standards.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 /* the secret key */
 static struct passwd *pgppwd;
 static CAST_KEY castkey;
-static u_int8_t randbuf[16];
+static uint8_t randbuf[16];
 
 /* pgp passwd */
 static int pgp_login(void *obj, struct passwd **uam_pwd,
-                    char *ibuf, int ibuflen,
-                    char *rbuf, int *rbuflen)
+                    char *ibuf, size_t ibuflen,
+                    char *rbuf, size_t *rbuflen)
 {
-    int len, i;
+    size_t len, i;
     char *name;
 
     *rbuflen = 0;
@@ -104,12 +104,12 @@ pgp_fail:
 }
 
 static int pgp_logincont(void *obj, struct passwd **uam_pwd,
-                        char *ibuf, int ibuflen, 
-                        char *rbuf, int *rbuflen)
+                        char *ibuf, size_t ibuflen, 
+                        char *rbuf, size_t *rbuflen)
 {
        unsigned char iv[] = "RJscorat";
     BIGNUM *bn1, *bn2, *bn3;
-    u_int16_t sessid;
+    uint16_t sessid;
     char *p;
 
     *rbuflen = 0;