]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_pam.c
Writing metadata xattr on directories with sticky bit set, FR#94
[netatalk.git] / etc / uams / uams_pam.c
index a374cc336e2e9c07774820e8c5a0c247c21ccd46..da5be62132a0dd073f53abdc880c6f4e2e06faf6 100644 (file)
@@ -1,5 +1,4 @@
 /*
- * $Id: uams_pam.c,v 1.24 2010-03-30 10:25:49 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #include <string.h>
-#include <atalk/logger.h>
-
 #ifdef HAVE_SECURITY_PAM_APPL_H
 #include <security/pam_appl.h>
 #endif
 #ifdef HAVE_PAM_PAM_APPL_H
 #include <pam/pam_appl.h>
 #endif
+#include <arpa/inet.h>
 
 #include <atalk/afp.h>
 #include <atalk/uam.h>
 #include <atalk/util.h>
+#include <atalk/logger.h>
+#include <atalk/compat.h>
 
 #define PASSWDLEN 8
 
@@ -53,7 +53,11 @@ extern UAM_MODULE_EXPORT void append(struct papfile *, const char *, int);
  * echo off means password.
  */
 static int PAM_conv (int num_msg,
+#ifdef LINUX
                      const struct pam_message **msg,
+#else
+                     struct pam_message **msg,
+#endif
                      struct pam_response **resp,
                      void *appdata_ptr _U_) 
 {
@@ -238,7 +242,7 @@ static int pam_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;
 
@@ -441,7 +445,7 @@ static int pam_printer(char *start, char *stop, char *username, struct papfile *
 }
 
 
-static int uam_setup(const char *path)
+static int uam_setup(void *obj, const char *path)
 {
   if (uam_register(UAM_SERVER_LOGIN_EXT, path, "Cleartxt Passwrd", 
                   pam_login, NULL, pam_logout, pam_login_ext) < 0)