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