updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / slim-cursor / slim.patch3
blob2163d20a5e324cd6ce2ec05689abac9af82dff09
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
4 ***************
5 *** 41,48 ****
6       Panel* panel = *static_cast<Panel**>(appdata_ptr);
7       int result = PAM_SUCCESS;
8       for (int i=0; i<num_msg; i++){
9 !         resp[i]->resp=0;
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
14 --- 41,48 ----
15       Panel* panel = *static_cast<Panel**>(appdata_ptr);
16       int result = PAM_SUCCESS;
17       for (int i=0; i<num_msg; i++){
18 !         (*resp)[i].resp=0;
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
23 ***************
24 *** 51,63 ****
25                       case Panel::Suspend:
26                       case Panel::Halt:
27                       case Panel::Reboot:
28 !                         resp[i]->resp=strdup("root");
29                           break;
30   
31                       case Panel::Console:
32                       case Panel::Exit:
33                       case Panel::Login:
34 !                         resp[i]->resp=strdup(panel->GetName().c_str());
35                           break;
36                   }
37                   break;
38 --- 51,63 ----
39                       case Panel::Suspend:
40                       case Panel::Halt:
41                       case Panel::Reboot:
42 !                         (*resp)[i].resp=strdup("root");
43                           break;
44   
45                       case Panel::Console:
46                       case Panel::Exit:
47                       case Panel::Login:
48 !                         (*resp)[i].resp=strdup(panel->GetName().c_str());
49                           break;
50                   }
51                   break;
52 ***************
53 *** 73,79 ****
54   
55                       default:
56                           panel->EventHandler(Panel::Get_Passwd);
57 !                         resp[i]->resp=strdup(panel->GetPasswd().c_str());
58                           break;
59                   }
60                   break;
61 --- 73,79 ----
62   
63                       default:
64                           panel->EventHandler(Panel::Get_Passwd);
65 !                         (*resp)[i].resp=strdup(panel->GetPasswd().c_str());
66                           break;
67                   }
68                   break;
69 ***************
70 *** 89,97 ****
71       }
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);
76 !             resp[i]->resp=0;
77           };
78           free(*resp);
79           *resp=0;
80 --- 89,97 ----
81       }
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);
86 !             (*resp)[i].resp=0;
87           };
88           free(*resp);
89           *resp=0;