Commit 318db0b
Fix mag_auth_basic function call.
In order to respect the API we'd have to return nech_type as a copy of
the mech found to correctly complete authentication.
It would need to be a copy because the actual_mechs variable is an array
of statically copied OIDs not an array of pointers.
Instead change mag_auth_basic to directly call mag_complete() and
mag_cache_basic on success. This is easier than attempting to handle
copying out OIDs and then freeing them in the caller as GSSAPI does not
offer standard APIs for copying OIDs.
As a side-effect we reduce the number of arguments to mag_auth_gssapi,
which is good, to the slight detriment of legibility in the main
function as now you need to know mag_auth_basic() is already calling
mag_complete(). The trade off is worth it though.
Signed-off-by: Simo Sorce <simo@redhat.com>1 parent d535dd4 commit 318db0b
1 file changed
+22
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
509 | 507 | | |
| 508 | + | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
520 | 523 | | |
521 | 524 | | |
522 | | - | |
| 525 | + | |
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
| |||
621 | 624 | | |
622 | 625 | | |
623 | 626 | | |
624 | | - | |
625 | | - | |
| 627 | + | |
| 628 | + | |
626 | 629 | | |
627 | | - | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
628 | 635 | | |
629 | 636 | | |
630 | 637 | | |
631 | 638 | | |
632 | 639 | | |
| 640 | + | |
| 641 | + | |
633 | 642 | | |
634 | 643 | | |
635 | 644 | | |
| |||
688 | 697 | | |
689 | 698 | | |
690 | 699 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | 700 | | |
696 | 701 | | |
697 | 702 | | |
| |||
1110 | 1115 | | |
1111 | 1116 | | |
1112 | 1117 | | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
| 1118 | + | |
1122 | 1119 | | |
1123 | 1120 | | |
1124 | 1121 | | |
| |||
0 commit comments