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.*/
goto DONE;
}
+#ifdef ALLOW_ROOT_PASSWD
/* If that didn't work, set the user to root, and try to authenticate again.
*/
if (user) free (user);
fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n",
blurb(), status, PAM_STRERROR(pamh, status));
+#endif /* ALLOW_ROOT_PASSWD */
+
DONE:
if (user) free (user);
if (pamh)
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,