Commit c6f96b3
committed
Shut down forked PAM handle
Shutting down the forked PAM handle must be done as per the Linux-PAM
documentation, specifically after setuid.
This is not a new requirement, but until recently (~2021) there was no
consequence to not doing so.
`pam_cap` now requires the handle to be shut down correctly in order to
configure ambient capabilities for the session. Importantly, these must
be configured after setuid, as setuid clears the ambient capability
vector.
Signed-off-by: Tudor Brindus <me@tbrindus.ca>1 parent 67a115e commit c6f96b3
3 files changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
664 | 676 | | |
665 | 677 | | |
666 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1567 | 1582 | | |
1568 | 1583 | | |
1569 | 1584 | | |
| |||
0 commit comments