http://slackware.bholcomb.com/slackware/slackware-11.0/source/xap/xscreensaver/xscree...
[xscreensaver] / driver / passwd.c
index 9a9a4b8863b4efe628970853eaa0f4088f3e3d69..f651e9727ef2bf44a22863ba39bb7d4bd53e90f1 100644 (file)
@@ -1,5 +1,5 @@
 /* passwd.c --- verifying typed passwords with the OS.
- * xscreensaver, Copyright (c) 1993-2002 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1993-2004 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -55,10 +55,17 @@ extern Bool kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
 extern Bool pam_priv_init (int argc, char **argv, Bool verbose_p);
 extern Bool pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
 #endif
+#ifdef PASSWD_HELPER_PROGRAM
+extern Bool ext_priv_init (int argc, char **argv, Bool verbose_p);
+extern Bool ext_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
+#endif
 extern Bool pwent_lock_init (int argc, char **argv, Bool verbose_p);
 extern Bool pwent_priv_init (int argc, char **argv, Bool verbose_p);
 extern Bool pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
 
+Bool lock_priv_init (int argc, char **argv, Bool verbose_p);
+Bool lock_init (int argc, char **argv, Bool verbose_p);
+Bool passwd_valid_p (const char *typed_passwd, Bool verbose_p);
 
 /* The authorization methods to try, in order.
    Note that the last one (the pwent version) is actually two auth methods,
@@ -74,6 +81,10 @@ struct auth_methods methods[] = {
   { "PAM",              0, pam_priv_init, pam_passwd_valid_p, 
                         False, False },
 # endif
+# ifdef PASSWD_HELPER_PROGRAM
+  { "external",                0, ext_priv_init, ext_passwd_valid_p,
+                       False, False },
+#endif
   { "normal",           pwent_lock_init, pwent_priv_init, pwent_passwd_valid_p,
                         False, False }
 };
@@ -153,7 +164,7 @@ passwd_valid_p (const char *typed_passwd, Bool verbose_p)
                            "%s: authentication via %s passwords failed.\n",
                            blurb(), methods[j].name);
               fprintf (stderr,
-                       "%s: but authentication via %s passwords succeeded.\n",
+                       "%s: authentication via %s passwords succeeded.\n",
                        blurb(), methods[i].name);
             }