]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_passwd.c
Posix/SUS portability cleanup
[netatalk.git] / etc / uams / uams_passwd.c
index 71e31787a1307fb6b7931336fa77e7e820fc94c8..db9be446cf2723d3dbe0d62ad848948190464e4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_passwd.c,v 1.29 2009-11-08 01:07:17 didg Exp $
+ * $Id: uams_passwd.c,v 1.31 2010-03-30 12:44:35 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
 #include <config.h>
 #endif /* HAVE_CONFIG_H */
 
-#include <sys/types.h>
-/* crypt needs _XOPEN_SOURCE (500) at least on BSD, but that breaks Solaris compile */
-#ifdef NETBSD
-#define _XOPEN_SOURCE 500 /* for crypt() */
-#endif
-#ifdef FREEBSD
-#define _XOPEN_SOURCE /* for crypt() */
-#endif
+#include <atalk/standards.h>
 
+#include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
 /* STDC check */
@@ -98,7 +92,7 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
     ibuf[ PASSWDLEN ] = '\0';
 
     if (( pwd = uam_getname(obj, username, ulen)) == NULL ) {
-        return AFPERR_PARAM;
+        return AFPERR_NOTAUTH;
     }
 
     LOG(log_info, logtype_uams, "cleartext login: %s", username);