- Notifications
You must be signed in to change notification settings - Fork5.1k
Commitea78bd6
committed
Use SOCK_ERRNO[_SET] in fe-secure-gssapi.c.
On Windows, this code did not handle error conditions correctly atall, since it looked at "errno" which is not used for socket-relatederrors on that platform. This resulted, for example, in failureto connect to a PostgreSQL server with GSSAPI enabled.We have a convention for dealing with this within libpq, which is touse SOCK_ERRNO and SOCK_ERRNO_SET rather than touching errno directly;but the GSSAPI code is a relative latecomer and did not get that memo.(The equivalent backend code continues to use errno, because thebackend does this differently. Maybe libpq's approach should berethought someday.)Apparently nobody tries to build libpq with GSSAPI support on Windows,or we'd have heard about this before, because it's been broken allalong. Back-patch to all supported branches.Author: Ning Wu <ning94803@gmail.com>Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CAFGqpvg-pRw=cdsUpKYfwY6D3d-m9tw8WMcAEE7HHWfm-oYWvw@mail.gmail.comBackpatch-through: 131 parent1a8b5b1 commitea78bd6
1 file changed
+15
-12
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
| 124 | + | |
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| |||
199 | 199 |
| |
200 | 200 |
| |
201 | 201 |
| |
202 |
| - | |
| 202 | + | |
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 |
| - | |
| 209 | + | |
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
218 |
| - | |
| 218 | + | |
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
| |||
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
| 344 | + | |
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
| |||
354 | 354 |
| |
355 | 355 |
| |
356 | 356 |
| |
357 |
| - | |
| 357 | + | |
358 | 358 |
| |
359 | 359 |
| |
360 | 360 |
| |
| |||
373 | 373 |
| |
374 | 374 |
| |
375 | 375 |
| |
376 |
| - | |
| 376 | + | |
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
| |||
393 | 393 |
| |
394 | 394 |
| |
395 | 395 |
| |
396 |
| - | |
| 396 | + | |
397 | 397 |
| |
398 | 398 |
| |
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 |
| - | |
| 404 | + | |
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
| |||
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
440 |
| - | |
| 440 | + | |
| 441 | + | |
441 | 442 |
| |
442 | 443 |
| |
443 | 444 |
| |
| |||
457 | 458 |
| |
458 | 459 |
| |
459 | 460 |
| |
460 |
| - | |
| 461 | + | |
| 462 | + | |
461 | 463 |
| |
462 | 464 |
| |
463 | 465 |
| |
| |||
520 | 522 |
| |
521 | 523 |
| |
522 | 524 |
| |
523 |
| - | |
| 525 | + | |
| 526 | + | |
524 | 527 |
| |
525 | 528 |
| |
526 | 529 |
| |
|
0 commit comments
Comments
(0)