Import OpenPAM Micrampelis.
[dragonfly.git] / contrib / openpam / doc / man / openpam.3
1 .\"-
2 .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
3 .\" Copyright (c) 2004-2011 Dag-Erling Smørgrav
4 .\" All rights reserved.
5 .\"
6 .\" This software was developed for the FreeBSD Project by ThinkSec AS and
7 .\" Network Associates Laboratories, the Security Research Division of
8 .\" Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
9 .\" ("CBOSS"), as part of the DARPA CHATS research program.
10 .\"
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
13 .\" are met:
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\"    notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\"    notice, this list of conditions and the following disclaimer in the
18 .\"    documentation and/or other materials provided with the distribution.
19 .\" 3. The name of the author may not be used to endorse or promote
20 .\"    products derived from this software without specific prior written
21 .\"    permission.
22 .\"
23 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" SUCH DAMAGE.
34 .\"
35 .\" $Id$
36 .\"
37 .Dd May 26, 2012
38 .Dt OPENPAM 3
39 .Os
40 .Sh NAME
41 .Nm openpam_borrow_cred ,
42 .Nm openpam_free_data ,
43 .Nm openpam_free_envlist ,
44 .Nm openpam_get_feature ,
45 .Nm openpam_get_option ,
46 .Nm openpam_log ,
47 .Nm openpam_nullconv ,
48 .Nm openpam_readline ,
49 .Nm openpam_readlinev ,
50 .Nm openpam_readword ,
51 .Nm openpam_restore_cred ,
52 .Nm openpam_set_feature ,
53 .Nm openpam_set_option ,
54 .Nm openpam_straddch ,
55 .Nm openpam_subst ,
56 .Nm openpam_ttyconv ,
57 .Nm pam_error ,
58 .Nm pam_get_authtok ,
59 .Nm pam_info ,
60 .Nm pam_prompt ,
61 .Nm pam_setenv ,
62 .Nm pam_verror ,
63 .Nm pam_vinfo ,
64 .Nm pam_vprompt
65 .Nd Pluggable Authentication Modules Library
66 .Sh LIBRARY
67 .Lb libpam
68 .Sh SYNOPSIS
69 .In security/openpam.h
70 .Ft "int"
71 .Fn openpam_borrow_cred "pam_handle_t *pamh" "const struct passwd *pwd"
72 .Ft "void"
73 .Fn openpam_free_data "pam_handle_t *pamh" "void *data" "int status"
74 .Ft "void"
75 .Fn openpam_free_envlist "char **envlist"
76 .Ft "int"
77 .Fn openpam_get_feature "int feature" "int *onoff"
78 .Ft "const char *"
79 .Fn openpam_get_option "pam_handle_t *pamh" "const char *option"
80 .Ft "void"
81 .Fn openpam_log "int level" "const char *fmt" "..."
82 .Ft "int"
83 .Fn openpam_nullconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data"
84 .Ft "char *"
85 .Fn openpam_readline "FILE *f" "int *lineno" "size_t *lenp"
86 .Ft "char **"
87 .Fn openpam_readlinev "FILE *f" "int *lineno" "int *lenp"
88 .Ft "char *"
89 .Fn openpam_readword "FILE *f" "int *lineno" "size_t *lenp"
90 .Ft "int"
91 .Fn openpam_restore_cred "pam_handle_t *pamh"
92 .Ft "int"
93 .Fn openpam_set_feature "int feature" "int onoff"
94 .Ft "int"
95 .Fn openpam_set_option "pam_handle_t *pamh" "const char *option" "const char *value"
96 .Ft "int"
97 .Fn openpam_straddch "char **str" "size_t *size" "size_t *len" "int ch"
98 .Ft "int"
99 .Fn openpam_subst "const pam_handle_t *pamh" "char *buf" "size_t *bufsize" "const char *template"
100 .Ft "int"
101 .Fn openpam_ttyconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data"
102 .Ft "int"
103 .Fn pam_error "const pam_handle_t *pamh" "const char *fmt" "..."
104 .Ft "int"
105 .Fn pam_get_authtok "pam_handle_t *pamh" "int item" "const char **authtok" "const char *prompt"
106 .Ft "int"
107 .Fn pam_info "const pam_handle_t *pamh" "const char *fmt" "..."
108 .Ft "int"
109 .Fn pam_prompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "..."
110 .Ft "int"
111 .Fn pam_setenv "pam_handle_t *pamh" "const char *name" "const char *value" "int overwrite"
112 .Ft "int"
113 .Fn pam_verror "const pam_handle_t *pamh" "const char *fmt" "va_list ap"
114 .Ft "int"
115 .Fn pam_vinfo "const pam_handle_t *pamh" "const char *fmt" "va_list ap"
116 .Ft "int"
117 .Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap"
118 .\"
119 .\" $Id: openpam.man 320 2006-02-16 20:33:19Z des $
120 .\"
121 .Sh DESCRIPTION
122 These functions are OpenPAM extensions to the PAM API.
123 Those named
124 .Fn pam_*
125 are, in the author's opinion, logical and necessary extensions to the
126 standard API, while those named
127 .Fn openpam_*
128 are either simple convenience functions, or functions intimately tied
129 to OpenPAM implementation details, and therefore not well suited to
130 standardization.
131 .Sh SEE ALSO
132 .Xr openpam_borrow_cred 3 ,
133 .Xr openpam_free_data 3 ,
134 .Xr openpam_free_envlist 3 ,
135 .Xr openpam_get_feature 3 ,
136 .Xr openpam_get_option 3 ,
137 .Xr openpam_log 3 ,
138 .Xr openpam_nullconv 3 ,
139 .Xr openpam_readline 3 ,
140 .Xr openpam_readlinev 3 ,
141 .Xr openpam_readword 3 ,
142 .Xr openpam_restore_cred 3 ,
143 .Xr openpam_set_feature 3 ,
144 .Xr openpam_set_option 3 ,
145 .Xr openpam_straddch 3 ,
146 .Xr openpam_subst 3 ,
147 .Xr openpam_ttyconv 3 ,
148 .Xr pam_error 3 ,
149 .Xr pam_get_authtok 3 ,
150 .Xr pam_info 3 ,
151 .Xr pam_prompt 3 ,
152 .Xr pam_setenv 3 ,
153 .Xr pam_verror 3 ,
154 .Xr pam_vinfo 3 ,
155 .Xr pam_vprompt 3
156 .Sh STANDARDS
157 .Rs
158 .%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
159 .%D "June 1997"
160 .Re
161 .Sh AUTHORS
162 The OpenPAM library and this manual page were developed for the
163 .Fx
164 Project by ThinkSec AS and Network Associates Laboratories, the
165 Security Research Division of Network Associates, Inc.\& under
166 DARPA/SPAWAR contract N66001-01-C-8035
167 .Pq Dq CBOSS ,
168 as part of the DARPA CHATS research program.
169 .Pp
170 The OpenPAM library is maintained by
171 .An Dag-Erling Sm\(/orgrav Aq des@des.no .