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