]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_dhx_passwd.c
Merge master
[netatalk.git] / etc / uams / uams_dhx_passwd.c
index 6abbab0a88e3c4d9337e3e1af5c56fab366f9529..76dd7ddd21e9e6f6bb7a666ed428c9c478326091 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: uams_dhx_passwd.c,v 1.27 2009-11-05 14:38:07 franklahm Exp $
- *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
  * All Rights Reserved.  See COPYRIGHT.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif /* HAVE_UNISTD_H */
 #ifdef HAVE_CRYPT_H
 #include <crypt.h>
 #endif /* ! HAVE_CRYPT_H */
-#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
-#endif
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
 #include <pwd.h>
+#include <arpa/inet.h>
+
 #ifdef SHADOWPW
 #include <shadow.h>
 #endif /* SHADOWPW */
+
 #if defined(GNUTLS_DHX)
 #include <gnutls/openssl.h>
 #elif defined(OPENSSL_DHX)
@@ -106,7 +101,7 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
 #endif /* TRU64 */
 
     if (( dhxpwd = uam_getname(obj, username, ulen)) == NULL ) {
-       return AFPERR_PARAM;
+        return AFPERR_NOTAUTH;
     }
     
     LOG(log_info, logtype_uams, "dhx login: %s", username);