1 diff -rc slim-1.3.1-orig/app.cpp slim-1.3.1/app.cpp
2 *** slim-1.3.1-orig/app.cpp 2008-09-26 02:54:15.000000000 +0200
3 --- slim-1.3.1/app.cpp 2009-02-17 19:50:06.000000000 +0100
6 Panel* panel = *static_cast<Panel**>(appdata_ptr);
7 int result = PAM_SUCCESS;
8 for (int i=0; i<num_msg; i++){
10 ! resp[i]->resp_retcode=0;
11 switch(msg[i]->msg_style){
12 case PAM_PROMPT_ECHO_ON:
13 // We assume PAM is asking for the username
15 Panel* panel = *static_cast<Panel**>(appdata_ptr);
16 int result = PAM_SUCCESS;
17 for (int i=0; i<num_msg; i++){
19 ! (*resp)[i].resp_retcode=0;
20 switch(msg[i]->msg_style){
21 case PAM_PROMPT_ECHO_ON:
22 // We assume PAM is asking for the username
28 ! resp[i]->resp=strdup("root");
34 ! resp[i]->resp=strdup(panel->GetName().c_str());
42 ! (*resp)[i].resp=strdup("root");
48 ! (*resp)[i].resp=strdup(panel->GetName().c_str());
56 panel->EventHandler(Panel::Get_Passwd);
57 ! resp[i]->resp=strdup(panel->GetPasswd().c_str());
64 panel->EventHandler(Panel::Get_Passwd);
65 ! (*resp)[i].resp=strdup(panel->GetPasswd().c_str());
72 if (result!=PAM_SUCCESS){
73 for (int i=0; i<num_msg; i++){
74 ! if (resp[i]->resp==0) continue;
75 ! free(resp[i]->resp);
82 if (result!=PAM_SUCCESS){
83 for (int i=0; i<num_msg; i++){
84 ! if ((*resp)[i].resp==0) continue;
85 ! free((*resp)[i].resp);