xref: /aosp_15_r20/external/libcap/contrib/sucap/README.md (revision 2810ac1b38eead2603277920c78344c84ddf3aff)
1*2810ac1bSKiyoung Kim# A fully capable version of `su`
2*2810ac1bSKiyoung Kim
3*2810ac1bSKiyoung KimThis directory contains a port of the `SimplePAMApp` `su` one that can
4*2810ac1bSKiyoung Kimwork in a `PURE1E` `libcap`-_mode_ environment.
5*2810ac1bSKiyoung Kim
6*2810ac1bSKiyoung KimThe point of developing this is to better test the full `libcap`
7*2810ac1bSKiyoung Kimimplementation, and to also provide a non-setuid-root worked example
8*2810ac1bSKiyoung Kimfor testing PAM interaction with `libcap` and `pam_cap.so`. The
9*2810ac1bSKiyoung Kimrequired expectations for `pam_unix.so` are that it include this
10*2810ac1bSKiyoung Kimcommit:
11*2810ac1bSKiyoung Kim
12*2810ac1bSKiyoung Kimhttps://github.com/linux-pam/linux-pam/pull/373/commits/bf9b1d8ad909634000a7356af2d865a79d3f86f3
13*2810ac1bSKiyoung Kim
14*2810ac1bSKiyoung KimThe original sources for this version of `su` were found here:
15*2810ac1bSKiyoung Kim
16*2810ac1bSKiyoung Kimhttps://kernel.org/pub/linux/libs/pam/pre/applications/SimplePAMApps-0.60.tar.gz
17*2810ac1bSKiyoung Kim
18*2810ac1bSKiyoung KimThe `SimplePAMApps` contain the same License as `libcap` (they were
19*2810ac1bSKiyoung Kimoriginally started by the same authors!). The credited Authors in the
20*2810ac1bSKiyoung Kimabove tarball were:
21*2810ac1bSKiyoung Kim
22*2810ac1bSKiyoung Kim-  Andrew [G.] Morgan
23*2810ac1bSKiyoung Kim-  Andrey V. Savochkin
24*2810ac1bSKiyoung Kim-  Alexei V. Galatenko
25*2810ac1bSKiyoung Kim
26*2810ac1bSKiyoung KimThe code in this present directory is freely adapted from the above
27*2810ac1bSKiyoung Kimtar ball and is thus a derived work from that.
28*2810ac1bSKiyoung Kim
29*2810ac1bSKiyoung Kim**NOTE** As of the time of writing, this adaptation is likely rife
30*2810ac1bSKiyoung Kim  with bugs.
31*2810ac1bSKiyoung Kim
32*2810ac1bSKiyoung KimFinally, Andrew would like to apologize to Andrey for removing all of
33*2810ac1bSKiyoung Kimthe config support he worked to add all those decades ago..! I just
34*2810ac1bSKiyoung Kimwanted to make a quick tester for a potential workaround for this
35*2810ac1bSKiyoung Kim`pam_cap.so` issue:
36*2810ac1bSKiyoung Kim
37*2810ac1bSKiyoung Kim-  https://bugzilla.kernel.org/show_bug.cgi?id=212945
38*2810ac1bSKiyoung Kim
39*2810ac1bSKiyoung KimAndrew G. Morgan <[email protected]>
40*2810ac1bSKiyoung Kim2021-06-30
41