rpms/xscreensaver/devel xscreensaver-5.01a1-pam-popup-passwindow.patch, NONE, 1.1

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Tue Sep 19 06:24:07 UTC 2006


Author: mtasaka

Update of /cvs/extras/rpms/xscreensaver/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24646

Added Files:
	xscreensaver-5.01a1-pam-popup-passwindow.patch 
Log Message:
Forgot to add one patch

xscreensaver-5.01a1-pam-popup-passwindow.patch:

--- NEW FILE xscreensaver-5.01a1-pam-popup-passwindow.patch ---
--- xscreensaver-5.01a1/config.h.in.nonpass	2006-09-19 00:48:59.000000000 +0900
+++ xscreensaver-5.01a1/config.h.in	2006-09-19 02:46:50.000000000 +0900
@@ -15,6 +15,9 @@
 /* Define this to allow the root password to unlock the screen. */
 #undef ALLOW_ROOT_PASSWD
 
+/* Define this if to allow non-password pam authentication */
+#undef ALLOW_NON_PASSWD
+
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
    */
--- xscreensaver-5.01a1/configure.in.nonpass	2006-09-19 02:25:57.000000000 +0900
+++ xscreensaver-5.01a1/configure.in	2006-09-19 03:05:53.000000000 +0900
@@ -1924,6 +1924,26 @@
 
 ###############################################################################
 #
+#       Whether to allow non-password authentication
+#
+###############################################################################
+AC_ARG_ENABLE(non-passwd, [
+  --enable-non-passwd        Allow non-passwd authentication
+                             to unlock screen (under PAM).
+  --disable-non-passwd       Do not allow that.
+
+  Default is NOT to allow non-passwd authentication],
+  [enable_root_passwd="$enableval"],[enable_root_passwd=no])
+if test "$enable_root_passwd" = yes; then
+  AC_DEFINE(ALLOW_NON_PASSWD)
+  true
+elif test "$enable_root_passwd" != no; then
+  echo "error: something wrong with non-passwd option. Check configure.in ."
+  exit 1
+fi
+
+###############################################################################
+#
 #       Check for Kerberos.
 #
 ###############################################################################
--- xscreensaver-5.01a1/driver/lock.c.nonpass	2006-05-18 08:35:54.000000000 +0900
+++ xscreensaver-5.01a1/driver/lock.c	2006-09-19 03:06:58.000000000 +0900
@@ -1614,12 +1614,25 @@
 }
 
 
+#ifdef HAVE_PAM
+#ifdef ALLOW_NON_PASSWD
+extern Bool pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p);
+#endif
+#endif
+
 Bool
 unlock_p (saver_info *si)
 {
   saver_preferences *p = &si->prefs;
   Bool status;
 
+#ifdef HAVE_PAM
+#ifdef ALLOW_NON_PASSWD
+  status = pam_passwd_valid_p ("", p->verbose_p);
+  if (status) return status;
+#endif
+#endif
+
   raise_window (si, True, True, True);
 
   if (p->verbose_p)




More information about the scm-commits mailing list