X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fuams%2Fuams_passwd.c;h=bec45a360813bd502affc3a9ac5eed8902f6fae3;hb=056d3ef4c88ba09eabb1fcbf06bdd9fe6e7af4cf;hp=72d024d2b521dc70b257f2f1e71c3e20d4e1e02a;hpb=80fe6e63eb8ec9a396b4383cb8210fd5ded6ad35;p=netatalk.git diff --git a/etc/uams/uams_passwd.c b/etc/uams/uams_passwd.c index 72d024d2..bec45a36 100644 --- a/etc/uams/uams_passwd.c +++ b/etc/uams/uams_passwd.c @@ -8,15 +8,9 @@ #include #endif /* HAVE_CONFIG_H */ -#include -/* 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 +#include #include #include #include @@ -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 ) {