Debian Codegraph @

doc/pam_cap.8

raw
1 .\" initially generated with Ronn-NG/v0.9.1
2 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1
3 .TH "PAM_CAP" "8" "2025-03-19" ""
4 .SH "NAME"
5 \fBpam_cap\fR \- Capabilities PAM module
6 .SH "SYNOPSIS"
7 [service\-name] \fBauth\fR control\-flag \fBpam_cap\fR [options]
8 .SH "DESCRIPTION"
9 The \fBpam_so\fR module can be used to specify \fIInheritable\fR
10 capabilities to process trees rooted in the PAM application\. The
11 module also supports blocking \fIBounding\fR vector capabilities and
12 adding \fIAmbient\fR vector capabilities\.
13 .P
14 For general PAM apps to work correctly, the application must be run
15 with at least \fBCAP_SETPCAP\fR raised in its \fIPermitted\fR
16 capability flag\. Many PAM applications run as \fIroot\fR, which has
17 all of the bits in the \fIBounding\fR set raised, so this requirement
18 is typically met\. To grant an \fIAmbient\fR vector capability, the
19 corresponding Permitted bit must be available to the application too\.
20 .P
21 The \fBpam_so\fR module is a Linux\-PAM \fIauth\fR module\. It
22 provides functionality to back \fBpam_sm_authenticate()\fR and
23 \fBpam_sm_setcred()\fR\. It is the latter that actually modifies the
24 inheritable 3\-tuple of capability vectors: the configured
25 \fIIAB\fR\. In a typical application configuration you might have a
26 line like this:
27 .IP "" 4
28 .nf
29 auth optional pam_cap\.so
30 .fi
31 .IP "" 0
32 .P
33 The module arguments are:
34 .IP "\[ci]" 4
35 \fBdebug\fR: While supported, this is a no\-op at present\.
36 .IP "\[ci]" 4
37 \fBconfig=\fR\fI/path/to/file\fR: Override the default config for the
38 module\. The unspecified default value for this file is
39 \fB/etc/security/capability\.conf\fR\. Note, \fBconfig=/dev/null\fR is
40 a valid value\. See \fBdefault=\fR below for situations in which this
41 might be appropriate\.
42 .IP "\[ci]" 4
43 \fBkeepcaps\fR: This is as much as the \fBpam_cap\.so\fR module can do
44 to help an application support use of the \fIAmbient\fR capability
45 vector\. The application support for the \fIAmbient\fR set is poor at
46 the present time\.
47 .IP "\[ci]" 4
48 \fBautoauth\fR: This argument causes the \fBpam_cap\.so\fR module to
49 return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR being authenticated
50 exists\. The absence of this argument will cause \fBpam_cap\.so\fR to
51 only return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR is covered by a
52 specific rule in the prevailing config file\.
53 .IP "\[ci]" 4
54 \fBdefault=\fR\fIIAB\fR: This argument is ignored if the prevailing
55 configuration file contains a "\fB*\fR" rule\. If there is no such
56 rule, the \fIIAB\fR 3\-tuple is inserted at the end of the config file
57 and applies to all \fBPAM_USER\fRs not covered by an earlier
58 rule\. Note, if you want all \fBPAM_USER\fRs to be covered by this
59 default rule, you can supply the module argument
60 \fBconfig=/dev/null\fR\.
61 .IP "\[ci]" 4
62 \fBdefer\fR: This argument arranges for the \fIIAB\fR capabilities
63 granted to a user to be added sufficiently late in the Linux\-PAM
64 authentication stack that they stick\. That is, \fIafter\fR the
65 application does its \fBsetuid(UID)\fR call\. As such, in conjunction
66 with the \fBkeepcaps\fR module argument, such compliant applications
67 can support granting \fIAmbient\fR vector capabilities with
68 \fBpam_cap\.so\fR\.
69
70 .IP "" 0
71 .SH "SEE ALSO"
72 .BR pam.conf (5),
73 .BR capability.conf (5),
74 .BR cap_text_formats (7),
75 .BR pam (8).