Added
Link Here
|
1 |
--- utils/ntlm_auth.c.orig Sun Jun 3 04:28:29 2007 |
2 |
+++ utils/ntlm_auth.c Sun Jun 3 04:47:26 2007 |
3 |
@@ -689,8 +689,8 @@ |
4 |
NTSTATUS nt_status; |
5 |
|
6 |
if (strlen(buf) < 2) { |
7 |
- DEBUG(1, ("NTLMSSP query [%s] invalid", buf)); |
8 |
- x_fprintf(x_stdout, "BH\n"); |
9 |
+ DEBUG(1, ("NTLMSSP query [%s] invalid\n", buf)); |
10 |
+ x_fprintf(x_stdout, "BH NTLMSSP query [%s] invalid\n", buf); |
11 |
return; |
12 |
} |
13 |
|
14 |
@@ -714,7 +714,7 @@ |
15 |
|
16 |
if (opt_password == NULL) { |
17 |
DEBUG(1, ("Out of memory\n")); |
18 |
- x_fprintf(x_stdout, "BH\n"); |
19 |
+ x_fprintf(x_stdout, "BH Out of memory\n"); |
20 |
data_blob_free(&request); |
21 |
return; |
22 |
} |
23 |
@@ -741,14 +741,14 @@ |
24 |
x_fprintf(x_stdout, "GK %s\n", key64?key64:"<NULL>"); |
25 |
SAFE_FREE(key64); |
26 |
} else { |
27 |
- x_fprintf(x_stdout, "BH\n"); |
28 |
+ x_fprintf(x_stdout, "BH missing NTLMSSP session key\n"); |
29 |
} |
30 |
|
31 |
data_blob_free(&request); |
32 |
return; |
33 |
} else { |
34 |
- DEBUG(1, ("NTLMSSP query [%s] invalid", buf)); |
35 |
- x_fprintf(x_stdout, "BH\n"); |
36 |
+ DEBUG(1, ("NTLMSSP query [%s] invalid\n", buf)); |
37 |
+ x_fprintf(x_stdout, "BH NTLMSSP query [%s] invalid\n", buf); |
38 |
return; |
39 |
} |
40 |
|
41 |
@@ -817,8 +817,8 @@ |
42 |
} |
43 |
|
44 |
if (strlen(buf) < 2) { |
45 |
- DEBUG(1, ("NTLMSSP query [%s] invalid", buf)); |
46 |
- x_fprintf(x_stdout, "BH\n"); |
47 |
+ DEBUG(1, ("NTLMSSP query [%s] invalid\n", buf)); |
48 |
+ x_fprintf(x_stdout, "BH NTLMSSP query [%s] invalid\n", buf); |
49 |
return; |
50 |
} |
51 |
|
52 |
@@ -842,7 +842,7 @@ |
53 |
|
54 |
if (opt_password == NULL) { |
55 |
DEBUG(1, ("Out of memory\n")); |
56 |
- x_fprintf(x_stdout, "BH\n"); |
57 |
+ x_fprintf(x_stdout, "BH Out of memory\n"); |
58 |
data_blob_free(&request); |
59 |
return; |
60 |
} |
61 |
@@ -892,14 +892,14 @@ |
62 |
SAFE_FREE(key64); |
63 |
} |
64 |
else { |
65 |
- x_fprintf(x_stdout, "BH\n"); |
66 |
+ x_fprintf(x_stdout, "BH missing session key\n"); |
67 |
} |
68 |
|
69 |
data_blob_free(&request); |
70 |
return; |
71 |
} else { |
72 |
- DEBUG(1, ("NTLMSSP query [%s] invalid", buf)); |
73 |
- x_fprintf(x_stdout, "BH\n"); |
74 |
+ DEBUG(1, ("NTLMSSP query [%s] invalid\n", buf)); |
75 |
+ x_fprintf(x_stdout, "BH NTLMSSP query [%s] invalid\n", buf); |
76 |
return; |
77 |
} |
78 |
|
79 |
@@ -1027,7 +1027,7 @@ |
80 |
|
81 |
if (len == -1) { |
82 |
DEBUG(1, ("Could not write SPNEGO data blob\n")); |
83 |
- x_fprintf(x_stdout, "BH\n"); |
84 |
+ x_fprintf(x_stdout, "BH Could not write SPNEGO data blob\n"); |
85 |
return; |
86 |
} |
87 |
|
88 |
@@ -1057,8 +1057,8 @@ |
89 |
pstring reply_argument; |
90 |
|
91 |
if (strlen(buf) < 2) { |
92 |
- DEBUG(1, ("SPENGO query [%s] invalid", buf)); |
93 |
- x_fprintf(x_stdout, "BH\n"); |
94 |
+ DEBUG(1, ("SPNEGO query [%s] invalid\n", buf)); |
95 |
+ x_fprintf(x_stdout, "BH SPNEGO query [%s] invalid\n", buf); |
96 |
return; |
97 |
} |
98 |
|
99 |
@@ -1068,8 +1068,8 @@ |
100 |
} else if (strncmp(buf, "KK", 2) == 0) { |
101 |
|
102 |
} else { |
103 |
- DEBUG(1, ("SPENGO query [%s] invalid", buf)); |
104 |
- x_fprintf(x_stdout, "BH\n"); |
105 |
+ DEBUG(1, ("SPNEGO query [%s] invalid\n", buf)); |
106 |
+ x_fprintf(x_stdout, "BH SPNEGO query [%s] invalid\n", buf); |
107 |
return; |
108 |
} |
109 |
|
110 |
@@ -1086,7 +1086,7 @@ |
111 |
|
112 |
if (strlen(buf) <= 3) { |
113 |
DEBUG(1, ("GSS-SPNEGO query [%s] invalid\n", buf)); |
114 |
- x_fprintf(x_stdout, "BH\n"); |
115 |
+ x_fprintf(x_stdout, "BH GSS-SPENEGO query [%s] invalid\n", buf); |
116 |
return; |
117 |
} |
118 |
|
119 |
@@ -1096,7 +1096,7 @@ |
120 |
|
121 |
if (len == -1) { |
122 |
DEBUG(1, ("GSS-SPNEGO query [%s] invalid", buf)); |
123 |
- x_fprintf(x_stdout, "BH\n"); |
124 |
+ x_fprintf(x_stdout, "BH GSS-SPNEGO query [%s] invalid", buf); |
125 |
return; |
126 |
} |
127 |
|
128 |
@@ -1107,8 +1107,8 @@ |
129 |
|
130 |
if ( (request.negTokenInit.mechTypes == NULL) || |
131 |
(request.negTokenInit.mechTypes[0] == NULL) ) { |
132 |
- DEBUG(1, ("Client did not offer any mechanism")); |
133 |
- x_fprintf(x_stdout, "BH\n"); |
134 |
+ DEBUG(1, ("Client did not offer any mechanism\n")); |
135 |
+ x_fprintf(x_stdout, "BH Client did not offer any mechanism\n"); |
136 |
return; |
137 |
} |
138 |
|
139 |
@@ -1116,15 +1116,15 @@ |
140 |
if (strcmp(request.negTokenInit.mechTypes[0], OID_NTLMSSP) == 0) { |
141 |
|
142 |
if ( request.negTokenInit.mechToken.data == NULL ) { |
143 |
- DEBUG(1, ("Client did not provide NTLMSSP data\n")); |
144 |
- x_fprintf(x_stdout, "BH\n"); |
145 |
+ DEBUG(1, ("Client did not provide NTLMSSP data\n")); |
146 |
+ x_fprintf(x_stdout, "BH Client did not provide NTLMSSP data\n"); |
147 |
return; |
148 |
} |
149 |
|
150 |
if ( ntlmssp_state != NULL ) { |
151 |
DEBUG(1, ("Client wants a new NTLMSSP challenge, but " |
152 |
"already got one\n")); |
153 |
- x_fprintf(x_stdout, "BH\n"); |
154 |
+ x_fprintf(x_stdout, "BH Client wants a new NTLMSSP challenge, but already got one\n"); |
155 |
ntlmssp_end(&ntlmssp_state); |
156 |
return; |
157 |
} |
158 |
@@ -1157,7 +1157,7 @@ |
159 |
|
160 |
if ( request.negTokenInit.mechToken.data == NULL ) { |
161 |
DEBUG(1, ("Client did not provide Kerberos data\n")); |
162 |
- x_fprintf(x_stdout, "BH\n"); |
163 |
+ x_fprintf(x_stdout, "BH Client did not provide Kerberos data\n"); |
164 |
return; |
165 |
} |
166 |
|
167 |
@@ -1183,7 +1183,7 @@ |
168 |
if (domain == NULL) { |
169 |
DEBUG(1, ("Did not get a valid principal " |
170 |
"from ads_verify_ticket\n")); |
171 |
- x_fprintf(x_stdout, "BH\n"); |
172 |
+ x_fprintf(x_stdout, "BH Did not get a valid principal from ads_verify_ticket\n"); |
173 |
return; |
174 |
} |
175 |
|
176 |
@@ -1206,13 +1206,14 @@ |
177 |
is the only one we support that sends this stuff */ |
178 |
DEBUG(1, ("Got a negTokenTarg for something non-NTLMSSP: %s\n", |
179 |
request.negTokenTarg.supportedMech)); |
180 |
- x_fprintf(x_stdout, "BH\n"); |
181 |
+ x_fprintf(x_stdout, "BH Got a negTokenTarg for something non-NTLMSSP: %s\n", |
182 |
+ request.negTokenTarg.supportedMech); |
183 |
return; |
184 |
} |
185 |
|
186 |
if (request.negTokenTarg.responseToken.data == NULL) { |
187 |
DEBUG(1, ("Got a negTokenTarg without a responseToken!\n")); |
188 |
- x_fprintf(x_stdout, "BH\n"); |
189 |
+ x_fprintf(x_stdout, "BH Got a negTokenTarg without a responseToken!\n"); |
190 |
return; |
191 |
} |
192 |
|
193 |
@@ -1256,7 +1257,7 @@ |
194 |
|
195 |
if (len == -1) { |
196 |
DEBUG(1, ("Could not write SPNEGO data blob\n")); |
197 |
- x_fprintf(x_stdout, "BH\n"); |
198 |
+ x_fprintf(x_stdout, "BH Could not write SPNEGO data blob\n"); |
199 |
return; |
200 |
} |
201 |
|
202 |
@@ -1346,7 +1347,7 @@ |
203 |
|
204 |
if (client_ntlmssp_state == NULL) { |
205 |
DEBUG(1, ("Got NTLMSSP tArg without a client state\n")); |
206 |
- x_fprintf(x_stdout, "BH\n"); |
207 |
+ x_fprintf(x_stdout, "BH Got NTLMSSP tArg without a client state\n"); |
208 |
return; |
209 |
} |
210 |
|
211 |
@@ -1370,7 +1371,9 @@ |
212 |
DEBUG(1, ("Expected MORE_PROCESSING_REQUIRED from " |
213 |
"ntlmssp_client_update, got: %s\n", |
214 |
nt_errstr(status))); |
215 |
- x_fprintf(x_stdout, "BH\n"); |
216 |
+ x_fprintf(x_stdout, "BH Expected MORE_PROCESSING_REQUIRED from " |
217 |
+ "ntlmssp_client_update, got: %s\n", |
218 |
+ nt_errstr(status)); |
219 |
data_blob_free(&request); |
220 |
ntlmssp_end(&client_ntlmssp_state); |
221 |
return; |
222 |
@@ -1486,7 +1489,7 @@ |
223 |
switch (spnego.negTokenTarg.negResult) { |
224 |
case SPNEGO_ACCEPT_INCOMPLETE: |
225 |
DEBUG(1, ("Got a Kerberos negTokenTarg with ACCEPT_INCOMPLETE\n")); |
226 |
- x_fprintf(x_stdout, "BH\n"); |
227 |
+ x_fprintf(x_stdout, "BH Got a Kerberos negTokenTarg with ACCEPT_INCOMPLETE\n"); |
228 |
break; |
229 |
case SPNEGO_ACCEPT_COMPLETED: |
230 |
DEBUG(10, ("Accept completed\n")); |
231 |
@@ -1518,7 +1521,7 @@ |
232 |
|
233 |
if (strlen(buf) <= 3) { |
234 |
DEBUG(1, ("SPNEGO query [%s] too short\n", buf)); |
235 |
- x_fprintf(x_stdout, "BH\n"); |
236 |
+ x_fprintf(x_stdout, "BH SPNEGO query [%s] too short\n", buf); |
237 |
return; |
238 |
} |
239 |
|
240 |
@@ -1532,7 +1535,7 @@ |
241 |
|
242 |
if (opt_password == NULL) { |
243 |
DEBUG(1, ("Out of memory\n")); |
244 |
- x_fprintf(x_stdout, "BH\n"); |
245 |
+ x_fprintf(x_stdout, "BH Out of memory\n"); |
246 |
data_blob_free(&request); |
247 |
return; |
248 |
} |
249 |
@@ -1546,7 +1549,7 @@ |
250 |
(strncmp(buf, "AF ", 3) != 0) && |
251 |
(strncmp(buf, "NA ", 3) != 0) ) { |
252 |
DEBUG(1, ("SPNEGO request [%s] invalid\n", buf)); |
253 |
- x_fprintf(x_stdout, "BH\n"); |
254 |
+ x_fprintf(x_stdout, "BH SPNEGO request [%s] invalid\n", buf); |
255 |
data_blob_free(&request); |
256 |
return; |
257 |
} |
258 |
@@ -1559,7 +1562,7 @@ |
259 |
|
260 |
if (len == -1) { |
261 |
DEBUG(1, ("Could not read SPNEGO data for [%s]\n", buf)); |
262 |
- x_fprintf(x_stdout, "BH\n"); |
263 |
+ x_fprintf(x_stdout, "BH Could not read SPNEGO data for [%s]\n", buf); |
264 |
return; |
265 |
} |
266 |
|
267 |
@@ -1588,7 +1591,7 @@ |
268 |
} |
269 |
|
270 |
DEBUG(1, ("Server offered no compatible mechanism\n")); |
271 |
- x_fprintf(x_stdout, "BH\n"); |
272 |
+ x_fprintf(x_stdout, "BH Server offered no compatible mechanism\n"); |
273 |
return; |
274 |
} |
275 |
|
276 |
@@ -1610,7 +1613,9 @@ |
277 |
DEBUG(1, ("Got a negTokenTarg with no mech and an " |
278 |
"unknown negResult: %d\n", |
279 |
spnego.negTokenTarg.negResult)); |
280 |
- x_fprintf(x_stdout, "BH\n"); |
281 |
+ x_fprintf(x_stdout, "BH Got a negTokenTarg with no mech and an " |
282 |
+ "unknown negResult: %d\n", |
283 |
+ spnego.negTokenTarg.negResult); |
284 |
} |
285 |
|
286 |
ntlmssp_end(&client_ntlmssp_state); |
287 |
@@ -1634,7 +1639,7 @@ |
288 |
} |
289 |
|
290 |
DEBUG(1, ("Got an SPNEGO token I could not handle [%s]!\n", buf)); |
291 |
- x_fprintf(x_stdout, "BH\n"); |
292 |
+ x_fprintf(x_stdout, "BH Got an SPNEGO token I could not handle [%s]!\n", buf); |
293 |
return; |
294 |
|
295 |
out: |