xref: /freebsd/contrib/openpam/t/t_pam_conv.h (revision 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456)
1*f3b0ac34SDag-Erling Smørgrav /*-
2*f3b0ac34SDag-Erling Smørgrav  * Copyright (c) 2015 Dag-Erling Smørgrav
3*f3b0ac34SDag-Erling Smørgrav  * All rights reserved.
4*f3b0ac34SDag-Erling Smørgrav  *
5*f3b0ac34SDag-Erling Smørgrav  * Redistribution and use in source and binary forms, with or without
6*f3b0ac34SDag-Erling Smørgrav  * modification, are permitted provided that the following conditions
7*f3b0ac34SDag-Erling Smørgrav  * are met:
8*f3b0ac34SDag-Erling Smørgrav  * 1. Redistributions of source code must retain the above copyright
9*f3b0ac34SDag-Erling Smørgrav  *    notice, this list of conditions and the following disclaimer.
10*f3b0ac34SDag-Erling Smørgrav  * 2. Redistributions in binary form must reproduce the above copyright
11*f3b0ac34SDag-Erling Smørgrav  *    notice, this list of conditions and the following disclaimer in the
12*f3b0ac34SDag-Erling Smørgrav  *    documentation and/or other materials provided with the distribution.
13*f3b0ac34SDag-Erling Smørgrav  * 3. The name of the author may not be used to endorse or promote
14*f3b0ac34SDag-Erling Smørgrav  *    products derived from this software without specific prior written
15*f3b0ac34SDag-Erling Smørgrav  *    permission.
16*f3b0ac34SDag-Erling Smørgrav  *
17*f3b0ac34SDag-Erling Smørgrav  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18*f3b0ac34SDag-Erling Smørgrav  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*f3b0ac34SDag-Erling Smørgrav  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*f3b0ac34SDag-Erling Smørgrav  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21*f3b0ac34SDag-Erling Smørgrav  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*f3b0ac34SDag-Erling Smørgrav  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*f3b0ac34SDag-Erling Smørgrav  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*f3b0ac34SDag-Erling Smørgrav  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*f3b0ac34SDag-Erling Smørgrav  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*f3b0ac34SDag-Erling Smørgrav  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*f3b0ac34SDag-Erling Smørgrav  * SUCH DAMAGE.
28*f3b0ac34SDag-Erling Smørgrav  */
29*f3b0ac34SDag-Erling Smørgrav 
30*f3b0ac34SDag-Erling Smørgrav #ifndef T_PAM_CONV_H_INCLUDED
31*f3b0ac34SDag-Erling Smørgrav #define T_PAM_CONV_H_INCLUDED
32*f3b0ac34SDag-Erling Smørgrav 
33*f3b0ac34SDag-Erling Smørgrav struct t_pam_conv_script {
34*f3b0ac34SDag-Erling Smørgrav 	int			 nmsg;
35*f3b0ac34SDag-Erling Smørgrav 	struct pam_message	*msgs;
36*f3b0ac34SDag-Erling Smørgrav 	struct pam_response	*resps;
37*f3b0ac34SDag-Erling Smørgrav 	char			*comment;
38*f3b0ac34SDag-Erling Smørgrav };
39*f3b0ac34SDag-Erling Smørgrav 
40*f3b0ac34SDag-Erling Smørgrav int t_pam_conv(int, const struct pam_message **, struct pam_response **,
41*f3b0ac34SDag-Erling Smørgrav 	void *);
42*f3b0ac34SDag-Erling Smørgrav 
43*f3b0ac34SDag-Erling Smørgrav #endif
44