[arch-commits] Commit in slim/trunk (PKGBUILD ptr_pam.patch)

Gaetan Bisson bisson at archlinux.org
Sun May 1 17:05:22 UTC 2011


    Date: Sunday, May 1, 2011 @ 13:05:22
  Author: bisson
Revision: 122020

fix FS#23995

Added:
  slim/trunk/ptr_pam.patch
Modified:
  slim/trunk/PKGBUILD

---------------+
 PKGBUILD      |   15 +++++++++------
 ptr_pam.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-05-01 11:30:18 UTC (rev 122019)
+++ PKGBUILD	2011-05-01 17:05:22 UTC (rev 122020)
@@ -6,7 +6,7 @@
 
 pkgname=slim
 pkgver=1.3.2
-pkgrel=4
+pkgrel=5
 pkgdesc='Desktop-independent graphical login manager for X11'
 arch=('i686' 'x86_64')
 url='http://slim.berlios.de/'
@@ -18,6 +18,7 @@
         'pam.d'
         'logrotate'
         'gcc44.patch'
+	'ptr_pam.patch'
         'no-host.patch'
         'restart.patch'
         'sigterm.patch'
@@ -27,6 +28,7 @@
           'a0e991ef0ac5120465a3be014a26e70ba073b6ae'
           'b969cc902c1d9915a5609141a652c77b2732407b'
           '51121d451116c768d0fc027ff1ea70aaaef036e7'
+          '640668c984a13593a1bfba8d3b503c005d5f401e'
           'b86eddd083fb9f6259e46c735f55ebe76c655bd3'
           '2d526bc0c498bf307ee50e2d22b4f53ffa0c4435'
           '0b35048723c527fb824c5e0f9b9064f751871785'
@@ -38,11 +40,12 @@
 	cd "${srcdir}/${pkgname}-${pkgver}"
 
 	sed -i -e 's/png12/png14/g' Makefile
-	patch -p1 -i ../gcc44.patch
-	patch -p1 -i ../no-host.patch # do not set PAM host
-	patch -p1 -i ../restart.patch # restart X server if killed
-	patch -p1 -i ../sigterm.patch # do not wait for user input when SIGTERM'd
-	patch -p1 -i ../tty-slowness.patch # fix sluggish TTY after slim start
+	patch -p1 -i ../gcc44.patch   # FS#14815: lacks include for gcc-4.4
+	patch -p1 -i ../ptr_pam.patch # FS#23995: pointer mishandling confuses PAM
+	patch -p1 -i ../no-host.patch # cf patch: do not set PAM host
+	patch -p1 -i ../restart.patch # cf patch: restart X server if killed
+	patch -p1 -i ../sigterm.patch # FS#23984: do not wait for input when SIGTERM'd
+	patch -p1 -i ../tty-slowness.patch # FS#18313: fix sluggish TTY after slim start
 
 	make USE_PAM=1
 }

Added: ptr_pam.patch
===================================================================
--- ptr_pam.patch	                        (rev 0)
+++ ptr_pam.patch	2011-05-01 17:05:22 UTC (rev 122020)
@@ -0,0 +1,52 @@
+diff -aur old/app.cpp new/app.cpp
+--- old/app.cpp	2010-07-08 07:04:10.000000000 +0200
++++ new/app.cpp	2011-05-01 18:30:52.933844872 +0200
+@@ -43,8 +43,8 @@
+     Panel* panel = *static_cast<Panel**>(appdata_ptr);
+     int result = PAM_SUCCESS;
+     for (int i=0; i<num_msg; i++){
+-        resp[i]->resp=0;
+-        resp[i]->resp_retcode=0;
++        (*resp)[i].resp=0;
++        (*resp)[i].resp_retcode=0;
+         switch(msg[i]->msg_style){
+             case PAM_PROMPT_ECHO_ON:
+                 // We assume PAM is asking for the username
+@@ -53,13 +53,13 @@
+                     case Panel::Suspend:
+                     case Panel::Halt:
+                     case Panel::Reboot:
+-                        resp[i]->resp=strdup("root");
++                        (*resp)[i].resp=strdup("root");
+                         break;
+ 
+                     case Panel::Console:
+                     case Panel::Exit:
+                     case Panel::Login:
+-                        resp[i]->resp=strdup(panel->GetName().c_str());
++                        (*resp)[i].resp=strdup(panel->GetName().c_str());
+                         break;
+                 }
+                 break;
+@@ -75,7 +75,7 @@
+ 
+                     default:
+                         panel->EventHandler(Panel::Get_Passwd);
+-                        resp[i]->resp=strdup(panel->GetPasswd().c_str());
++                        (*resp)[i].resp=strdup(panel->GetPasswd().c_str());
+                         break;
+                 }
+                 break;
+@@ -91,9 +91,9 @@
+     }
+     if (result!=PAM_SUCCESS){
+         for (int i=0; i<num_msg; i++){
+-            if (resp[i]->resp==0) continue;
+-            free(resp[i]->resp);
+-            resp[i]->resp=0;
++            if ((*resp)[i].resp==0) continue;
++            free((*resp)[i].resp);
++            (*resp)[i].resp=0;
+         };
+         free(*resp);
+         *resp=0;




More information about the arch-commits mailing list