]> arthur.barton.de Git - netatalk.git/blobdiff - etc/uams/uams_passwd.c
Merge master
[netatalk.git] / etc / uams / uams_passwd.c
index 72d024d2b521dc70b257f2f1e71c3e20d4e1e02a..bec45a360813bd502affc3a9ac5eed8902f6fae3 100644 (file)
@@ -8,15 +8,9 @@
 #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>
 #include <string.h>
@@ -96,7 +90,7 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
     }
     pwd->pw_passwd = sp->sp_pwdp;
 
-    if (sp && sp->sp_max != -1 && sp->sp_lstchg) {
+    if (sp->sp_max != -1 && sp->sp_lstchg) {
         time_t now = time(NULL) / (60*60*24);
         int32_t expire_days = sp->sp_lstchg - now + sp->sp_max;
         if ( expire_days < 0 ) {
@@ -325,7 +319,7 @@ static int passwd_printer(char      *start, char *stop, char *username, struct papfil
     }
     pwd->pw_passwd = sp->sp_pwdp;
 
-    if (sp && sp->sp_max != -1 && sp->sp_lstchg) {
+    if (sp->sp_max != -1 && sp->sp_lstchg) {
         time_t now = time(NULL) / (60*60*24);
         int32_t expire_days = sp->sp_lstchg - now + sp->sp_max;
         if ( expire_days < 0 ) {