summaryrefslogtreecommitdiff
path: root/staging/slim/ptr_pam.patch
diff options
context:
space:
mode:
Diffstat (limited to 'staging/slim/ptr_pam.patch')
-rw-r--r--staging/slim/ptr_pam.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/staging/slim/ptr_pam.patch b/staging/slim/ptr_pam.patch
new file mode 100644
index 000000000..3a3fbcdb7
--- /dev/null
+++ b/staging/slim/ptr_pam.patch
@@ -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;