Commit 30fdfb9
committed
Second blank check with root for non-existent users must never return 1
The commit af0faf6 ("pam_unix: avoid determining if user exists") introduced
a regression where the blank check could return 1 if root had an empty
password hash because in the second case the password hash of root was
used. We now always return 0 in this case.
The issue was found by Johannes Löthberg.
Fixes #284
* modules/pam_unix/support.c (_unix_blankpasswd): Make the loop
to cover the complete blank check so both existing and non existing
cases are identical except for the possible return value.1 parent e50eb50 commit 30fdfb9
1 file changed
Lines changed: 13 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
605 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
606 | 607 | | |
607 | 608 | | |
608 | 609 | | |
| |||
632 | 633 | | |
633 | 634 | | |
634 | 635 | | |
635 | | - | |
| 636 | + | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | 640 | | |
645 | | - | |
646 | | - | |
647 | | - | |
| 641 | + | |
648 | 642 | | |
649 | 643 | | |
650 | | - | |
651 | | - | |
652 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
653 | 649 | | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 650 | + | |
| 651 | + | |
664 | 652 | | |
665 | 653 | | |
666 | 654 | | |
667 | | - | |
668 | 655 | | |
669 | 656 | | |
670 | 657 | | |
671 | | - | |
| 658 | + | |
672 | 659 | | |
673 | 660 | | |
674 | 661 | | |
| |||
0 commit comments