Updated xscreensaver-14-pam_audit.diff to fix bug screensaver continues to accept old password. Bug 7008058 s11express-2010-11 OSE1011_SRU4_03
authorakumrao
Tue, 22 Feb 2011 07:43:39 +0000
branchs11express-2010-11
changeset 21473 8a5e3434934f
parent 21459 0e1c903bf9a6
child 21604 6bc32a8859c5
Updated xscreensaver-14-pam_audit.diff to fix bug screensaver continues to accept old password. Bug 7008058 Updated xscreensaver-14-pam_audit.diff and added xscreensaver-28-verbose.diff to stop verbose messaging. Bug 7017539
ChangeLog
patches/xscreensaver-14-pam_audit.diff
patches/xscreensaver-28-verbose.diff
specs/SUNWxscreensaver.spec
--- a/ChangeLog	Fri Feb 18 04:54:24 2011 +0000
+++ b/ChangeLog	Tue Feb 22 07:43:39 2011 +0000
@@ -1,3 +1,7 @@
+2011-02-18 [email protected] 
+	* Updated xscreensaver-14-pam_audit.diff to fix bug screensaver continues to accept old password. Bug 7008058
+	* Updated xscreensaver-14-pam_audit.diff and added xscreensaver-28-verbose.diff to stop verbose messaging. Bug 7017539 
+
 2011-02-18  Abhijit Nath <[email protected]>
 
         * base-specs/pidgin.spec
--- a/patches/xscreensaver-14-pam_audit.diff	Fri Feb 18 04:54:24 2011 +0000
+++ b/patches/xscreensaver-14-pam_audit.diff	Tue Feb 22 07:43:39 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -24,10 +24,27 @@
 Fixes for bugs:
 5015296, P1, gnome/screensaver - xscreensaver doesn't audit
 6417168, P3, gnome/screensaver - xscreensaver loops while trying to unlock a session for a user whose password was expired
+7008058, P3, screensaver continues to accept old password for existing sessions after password changed
+---
+ driver/Makefile.in  |    6 +-
+ driver/passwd-pam.c |  177 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ driver/passwd.c     |    4 +
+ 3 files changed, 174 insertions(+), 13 deletions(-)
 
 diff --git xscreensaver-5.11/driver/Makefile.in xscreensaver-5.11/driver/Makefile.in
 --- xscreensaver-5.11/driver/Makefile.in
 +++ xscreensaver-5.11/driver/Makefile.in
+@@ -109,8 +109,8 @@ TRUSTED_LIBS	= -lglib-2.0 -lsecdb
+ TRUSTED_SRCS	= trusted-utils.c
+ TRUSTED_OBJS	= trusted-utils.o
+ 
+-PWENT_SRCS	= passwd-pwent.c
+-PWENT_OBJS	= passwd-pwent.o
++PWENT_SRCS	= # passwd-pwent.c - Not used in Solaris builds
++PWENT_OBJS	= # passwd-pwent.o - Not used in Solaris builds
+ 
+ KERBEROS_SRCS	= passwd-kerberos.c
+ KERBEROS_OBJS	= passwd-kerberos.o
 @@ -217,7 +217,7 @@ PDF2JPEG_LIBS	= -framework Cocoa
  SAVER_LIBS	= $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
  		  $(XDPMS_LIBS) $(XINERAMA_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
@@ -197,7 +214,7 @@
    if (status != PAM_SUCCESS) goto DONE;
  
  #ifdef __sun
-@@ -307,6 +436,14 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+@@ -307,22 +436,27 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
  # endif /* HAVE_SIGTIMEDWAIT */
    unblock_sigchld();
  
@@ -212,9 +229,34 @@
  #ifdef HAVE_XSCREENSAVER_LOCK
    /* Send status message to unlock dialog */
    if (pam_auth_status == PAM_SUCCESS)
-@@ -354,7 +491,14 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+     {
+-      write_to_child (si, "ul_ok", PAM_STRERROR (pamh, pam_auth_status));
+       if (verbose_p)
+-        sleep (1);
++        write_to_child (si, "ul_ok", PAM_STRERROR (pamh, pam_auth_status));
+     }
+   else if (si->unlock_state != ul_cancel && si->unlock_state != ul_time)
+     {
+       write_to_child (si, "ul_fail", PAM_STRERROR (pamh, pam_auth_status));
+-      if (verbose_p)
+-        sleep (1);
+-      else
+-        usleep (500000); /* sleep for 1/2 of sec */
+     }
++  if (verbose_p)
++    sleep (1);
+ #endif
+ 
+   if (verbose_p)
+@@ -352,9 +486,19 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+ #ifdef HAVE_XSCREENSAVER_LOCK
+       /* Send status message to unlock dialog ***/
        if (acct_rc == PAM_SUCCESS)
-         write_to_child (si, "ul_acct_ok", PAM_STRERROR(pamh, acct_rc));
+-        write_to_child (si, "ul_acct_ok", PAM_STRERROR(pamh, acct_rc));
++        {
++          if (verbose_p)
++            write_to_child (si, "ul_acct_ok", PAM_STRERROR(pamh, acct_rc));
++        }
        else
 -        write_to_child (si, "ul_acct_fail", PAM_STRERROR(pamh, acct_rc));
 +        {
@@ -239,9 +281,15 @@
            if (chauth_rc != PAM_SUCCESS)
              {
                pam_auth_status = chauth_rc;
-@@ -416,7 +564,13 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+@@ -414,9 +562,18 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+ #ifdef HAVE_XSCREENSAVER_LOCK
+       /* Send status message to unlock dialog ***/
        if (setcred_rc == PAM_SUCCESS)
-         write_to_child (si, "ul_setcred_ok", PAM_STRERROR(pamh, setcred_rc));
+-        write_to_child (si, "ul_setcred_ok", PAM_STRERROR(pamh, setcred_rc));
++        {
++          if (verbose_p)
++            write_to_child (si, "ul_setcred_ok", PAM_STRERROR(pamh, setcred_rc));
++        }
        else
 -        write_to_child (si, "ul_setcred_fail", PAM_STRERROR(pamh, setcred_rc));
 +        {
@@ -254,4 +302,31 @@
        if (verbose_p)
          sleep (1);
  #endif
+diff --git xscreensaver-5.11/driver/passwd.c xscreensaver-5.11/driver/passwd.c
+--- xscreensaver-5.11/driver/passwd.c
++++ xscreensaver-5.11/driver/passwd.c
+@@ -79,9 +79,11 @@ extern void pam_try_unlock (saver_info *si, Bool verbose_p,
+ 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
++#ifndef __sun /* Only use PAM on Solaris, not direct getpwent */
+ 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);
++#endif
+ 
+ Bool lock_priv_init (int argc, char **argv, Bool verbose_p);
+ Bool lock_init (int argc, char **argv, Bool verbose_p);
+@@ -105,8 +107,10 @@ struct auth_methods methods[] = {
+   { "external",		0, ext_priv_init, ext_passwd_valid_p, 0,
+   			False, False },
+ # endif
++# ifndef __sun /* Only use PAM on Solaris, not direct getpwent */
+   { "normal",           pwent_lock_init, pwent_priv_init, pwent_passwd_valid_p, 0,
+                         False, False }
++# endif
+ };
+ 
+ 
+1.7.3.2
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/xscreensaver-28-verbose.diff	Tue Feb 22 07:43:39 2011 +0000
@@ -0,0 +1,46 @@
+Bug 16559 - xscreensaver shows extra messages
+https://defect.opensolaris.org/bz/show_bug.cgi?id=16559
+CR 7017539 P3 gnome/screensaver Xscreensaver shows a "Authentication via PAM timed out" message
+
+Make messages that annoy users only appear when verbose is set.
+(Upstream wasn't showing these until we started capturing stderr.)
+
+---
+ driver/passwd.c |   12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git xscreensaver-5.11/driver/passwd.c xscreensaver-5.11/driver/passwd.c
+--- xscreensaver-5.11/driver/passwd.c
++++ xscreensaver-5.11/driver/passwd.c
+@@ -283,8 +283,11 @@ xss_authenticate(saver_info *si, Bool verbose_p)
+           si->cached_passwd &&
+           !*si->cached_passwd)
+         {
+-          fprintf (stderr, "%s: assuming null password means cancel.\n",
+-                   blurb());
++          if (verbose_p)
++            {
++              fprintf (stderr, "%s: assuming null password means cancel.\n",
++                       blurb());
++            }
+           si->unlock_state = ul_cancel;
+         }
+ 
+@@ -313,11 +316,14 @@ xss_authenticate(saver_info *si, Bool verbose_p)
+         {
+           /* If any auth method gets a cancel or timeout, don't try the
+              next auth method!  We're done! */
+-          fprintf (stderr,
++          if (verbose_p)
++            {
++              fprintf (stderr,
+                    "%s: authentication via %s %s.\n",
+                        blurb(), methods[i].name,
+                    (si->unlock_state == ul_cancel
+                     ? "cancelled" : "timed out"));
++            }
+           goto DONE;
+         }
+     }
+1.7.3.2
+
--- a/specs/SUNWxscreensaver.spec	Fri Feb 18 04:54:24 2011 +0000
+++ b/specs/SUNWxscreensaver.spec	Tue Feb 22 07:43:39 2011 +0000
@@ -126,6 +126,8 @@
 Patch26: xscreensaver-26-demo-accessibility.diff
 # date:2010-06-30 owner:arvind type:bug bugster:6964562
 Patch27: xscreensaver-27-bug-6964562.diff
+# date:2011-02-17 owner:arvind type:bug bugster:7017539
+Patch28: xscreensaver-28-verbose.diff
 
 # date:2008-03-07 owner:alanc type:branding
 Patch101: rss-glx-101-matrixview.diff
@@ -265,6 +267,7 @@
 %patch25 -p1
 %patch26 -p1
 %patch27 -p1
+%patch28 -p1
 
 chmod a+x install-sh configure
 
@@ -625,6 +628,9 @@
 %endif
 
 %changelog
+* Thu Feb 17 2011 - arvind.umrao at oracle.com 
+- Updated xscreensaver-14-pam_audit.diff to fix bug screensaver continues to accept old password. Bug 7008058
+- Updated xscreensaver-14-pam_audit.diff and added xscreensaver-28-verbose.diff to stop verbose messaging. Bug 7017539 
 * Thu Oct 21 2010 - alan.coopersmith at oracle.com
 - Temporarily disable mapfiles that trigger linker bug 6988300 until build
   machines are all upgraded to WOS build snv_151 or later.