1 .\" Copyright (c) 2001,2003 Networks Associates Technology, Inc.
2 .\" Copyright (c) 2017 Dag-Erling Smørgrav
3 .\" All rights reserved.
5 .\" Portions of this software were developed for the FreeBSD Project by
6 .\" ThinkSec AS and NAI Labs, the Security Research Division of Network
7 .\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
8 .\" ("CBOSS"), as part of the DARPA CHATS research program.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. The name of the author may not be used to endorse or promote
19 .\" products derived from this software without specific prior written
22 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49 The exec service module for PAM executes the program designated by
50 its first argument if no options are specified, with its remaining
51 arguments as command-line arguments.
52 If options are specified, the program and its arguments follow the last
55 if the program name conflicts with an option name.
57 The following options may be passed before the program and its
59 .Bl -tag -width indent
61 Capture text printed by the program to its standard error stream and
62 pass it to the conversation function as error messages.
63 No attempt is made at buffering the text, so results may vary.
65 Capture text printed by the program to its standard output stream and
66 pass it to the conversation function as informational messages.
67 No attempt is made at buffering the text, so results may vary.
69 Ignored for compatibility reasons.
71 Ignored for compatibility reasons.
72 .It Cm return_prog_exit_status
73 Use the program exit status as the return code of the pam_sm_* function.
74 It must be a valid return value for this function.
77 program and its arguments follow.
80 The child's environment is set to the current PAM environment list,
82 .Xr pam_getenvlist 3 .
83 In addition, the following PAM items are exported as environment
95 variable contains the name of the PAM service module function being
98 .Bl -dash -offset indent -compact
114 .Cm return_prog_exit_status
115 is not set (default), the
119 if the program exit status is 0,
124 .Cm return_prog_exit_status
125 is set, the program exit status is used.
128 or one of the error codes allowed by the calling
131 The valid codes are documented in each function man page.
132 If the exit status is not a valid return code,
135 Each valid codes numerical value is available as an environment variable
138 .Ev PAM_USER_UNKNOWN ,
140 This is useful in shell scripts for instance.
145 .Xr pam_sm_acct_mgmt 8 ,
146 .Xr pam_sm_authenticate 8 ,
147 .Xr pam_sm_chauthtok 8 ,
148 .Xr pam_sm_close_session 8 ,
149 .Xr pam_sm_open_session 8 ,
154 module and this manual page were developed for the
157 ThinkSec AS and NAI Labs, the Security Research Division of Network
158 Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
160 as part of the DARPA CHATS research program.