X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fpasswd-pam.c;h=5c4f74f2d442fa3de14b829f5c91dcab2379b6af;hb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;hp=52347aad5f3fcd10e7e00e5545f48cfaea1be149;hpb=447db08c956099b3b183886729108bf5b364c4b8;p=xscreensaver diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c index 52347aad..5c4f74f2 100644 --- a/driver/passwd-pam.c +++ b/driver/passwd-pam.c @@ -89,6 +89,8 @@ struct pam_closure { Bool verbose_p; }; +Bool pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p); +Bool pam_priv_init (int argc, char **argv, Bool verbose_p); #ifdef HAVE_PAM_FAIL_DELAY /* We handle delays ourself.*/ @@ -339,7 +341,11 @@ pam_priv_init (int argc, char **argv, Bool verbose_p) const char file2[] = "/etc/pam.conf"; struct stat st; - if (stat (dir, &st) == 0 && st.st_mode & S_IFDIR) +# ifndef S_ISDIR +# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +# endif + + if (stat (dir, &st) == 0 && S_ISDIR(st.st_mode)) { if (stat (file, &st) != 0) fprintf (stderr,