1 |
ulm 10/09/08 18:31:38 |
2 |
|
3 |
Modified: 01_all_gentoo.patch |
4 |
Log: |
5 |
Patchset corresponding to pam_skey-1.1.5-gentoo-1.patch.bz2. |
6 |
|
7 |
Revision Changes Path |
8 |
1.2 src/patchsets/pam_skey/1.1.5/01_all_gentoo.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/pam_skey/1.1.5/01_all_gentoo.patch?rev=1.2&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/pam_skey/1.1.5/01_all_gentoo.patch?rev=1.2&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/pam_skey/1.1.5/01_all_gentoo.patch?r1=1.1&r2=1.2 |
13 |
|
14 |
Index: 01_all_gentoo.patch |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/src/patchsets/pam_skey/1.1.5/01_all_gentoo.patch,v |
17 |
retrieving revision 1.1 |
18 |
retrieving revision 1.2 |
19 |
diff -u -r1.1 -r1.2 |
20 |
--- 01_all_gentoo.patch 8 Sep 2010 18:29:54 -0000 1.1 |
21 |
+++ 01_all_gentoo.patch 8 Sep 2010 18:31:38 -0000 1.2 |
22 |
@@ -1,7 +1,7 @@ |
23 |
--- pam_skey-1.1.5/INSTALL |
24 |
+++ pam_skey/INSTALL |
25 |
@@ -1,5 +1,39 @@ |
26 |
- $Id: 01_all_gentoo.patch,v 1.1 2010/09/08 18:29:54 ulm Exp $ |
27 |
+ $Id: 01_all_gentoo.patch,v 1.2 2010/09/08 18:31:38 ulm Exp $ |
28 |
|
29 |
+Gentoo patch |
30 |
+------------ |
31 |
@@ -94,7 +94,7 @@ |
32 |
--- pam_skey-1.1.5/README |
33 |
+++ pam_skey/README |
34 |
@@ -1,5 +1,77 @@ |
35 |
- $Id: 01_all_gentoo.patch,v 1.1 2010/09/08 18:29:54 ulm Exp $ |
36 |
+ $Id: 01_all_gentoo.patch,v 1.2 2010/09/08 18:31:38 ulm Exp $ |
37 |
|
38 |
+Gentoo patch |
39 |
+------------ |
40 |
@@ -231,8 +231,9 @@ |
41 |
--- pam_skey-1.1.5/pam_skey.c |
42 |
+++ pam_skey/pam_skey.c |
43 |
@@ -1,5 +1,6 @@ |
44 |
- /* |
45 |
+-/* |
46 |
- * (c) 2001 Dinko Korunic, kreator@××××.hr |
47 |
++/* |
48 |
+ * Rewrite (c) 2005 Dani Church, dani.church@×××××.com |
49 |
+ * Original (c) 2001 Dinko Korunic, kreator@××××.hr |
50 |
* |
51 |
@@ -264,7 +265,7 @@ |
52 |
+#define LOGDEBUG(x) if (mod_opt & _MOD_DEBUG) { syslog x ;} |
53 |
+#define QUERY_USERNAME NULL /* Use default username prompt */ |
54 |
+#define QUERY_PASSWORD "Password: " |
55 |
-+#define QUERY_RESPONSE_OR_PASSWORD "S/Key response or system password: " |
56 |
++#define QUERY_RESPONSE_OR_PASSWORD "S/Key response or password: " |
57 |
+#define QUERY_RESPONSE "S/Key response: " |
58 |
|
59 |
PAM_EXTERN int pam_sm_setcred (pam_handle_t *pamh, int flags, |
60 |
@@ -600,14 +601,15 @@ |
61 |
} |
62 |
|
63 |
/* Get module optional parameters */ |
64 |
-@@ -328,13 +207,13 @@ |
65 |
+@@ -328,13 +207,15 @@ |
66 |
} |
67 |
|
68 |
/* This will talk to user through PAM_CONV */ |
69 |
-static int mod_talk_touser(pam_handle_t *pamh, unsigned *mod_opt, |
70 |
- char *msg_text, char **response) |
71 |
+static int mod_talk_touser(pam_handle_t *pamh, unsigned mod_opt, |
72 |
-+ const char *info_text, const char *prompt_text, int echo_on, char **response) |
73 |
++ const char *info_text, const char *prompt_text, int echo_on, |
74 |
++ char **response) |
75 |
{ |
76 |
- struct pam_message message; |
77 |
- const struct pam_message *pmessage = &message; |
78 |
@@ -615,10 +617,11 @@ |
79 |
struct pam_conv *conv = NULL; |
80 |
struct pam_response *presponse = NULL; |
81 |
+ int i=0; |
82 |
++ int status; |
83 |
|
84 |
/* Better safe than sorry */ |
85 |
*response = NULL; |
86 |
-@@ -342,26 +221,30 @@ |
87 |
+@@ -342,40 +223,45 @@ |
88 |
/* Be paranoid */ |
89 |
memset(&message, 0, sizeof(message)); |
90 |
|
91 |
@@ -632,7 +635,9 @@ |
92 |
- message.msg = msg_text; |
93 |
+ pmessage[0] = &message[0]; |
94 |
+ pmessage[1] = &message[1]; |
95 |
-+ |
96 |
+ |
97 |
+- /* Do conversation and see if all is OK */ |
98 |
+- if (pam_get_item(pamh, PAM_CONV, (_PAM_CONST void **)&conv) |
99 |
+ /* Set info text, if any */ |
100 |
+ if (info_text) { |
101 |
+ message[i].msg = info_text; |
102 |
@@ -644,9 +649,8 @@ |
103 |
+ message[i].msg = prompt_text; |
104 |
+ message[i].msg_style = echo_on ? PAM_PROMPT_ECHO_ON : PAM_PROMPT_ECHO_OFF; |
105 |
+ i++; |
106 |
- |
107 |
- /* Do conversation and see if all is OK */ |
108 |
-- if (pam_get_item(pamh, PAM_CONV, (_PAM_CONST void **)&conv) |
109 |
++ |
110 |
++ /* Get conversation function */ |
111 |
+ if (pam_get_item(pamh, PAM_CONV, (const void **)(void *)&conv) |
112 |
!= PAM_SUCCESS) |
113 |
{ |
114 |
@@ -658,12 +662,20 @@ |
115 |
- |
116 |
- /* Convert into pam_response - only 1 reply expected */ |
117 |
- if (conv->conv(1, _PAM_MSG_CAST &pmessage, &presponse, |
118 |
-+ /* Convert into pam_response */ |
119 |
-+ if (conv->conv(i, (const struct pam_message **)pmessage, &presponse, |
120 |
- conv->appdata_ptr) |
121 |
- != PAM_SUCCESS) |
122 |
+- conv->appdata_ptr) |
123 |
+- != PAM_SUCCESS) |
124 |
++ /* Do conversation and see if all is OK */ |
125 |
++ status = conv->conv(i, (const struct pam_message **)pmessage, |
126 |
++ &presponse, conv->appdata_ptr); |
127 |
++ if (status != PAM_SUCCESS) |
128 |
{ |
129 |
-@@ -372,10 +255,10 @@ |
130 |
+- _pam_delete(presponse->resp); |
131 |
+- return PAM_SERVICE_ERR; |
132 |
++ if (presponse != NULL) |
133 |
++ _pam_delete(presponse->resp); |
134 |
++ return status; |
135 |
+ } |
136 |
+ |
137 |
if (presponse != NULL) |
138 |
{ |
139 |
/* Save address */ |