1bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman/* $Id: auth-pam.h,v 1.27 2004/09/11 12:17:26 dtucker Exp $ */
2bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman
3bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman/*
4bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * Copyright (c) 2000 Damien Miller.  All rights reserved.
5bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman *
6bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * Redistribution and use in source and binary forms, with or without
7bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * modification, are permitted provided that the following conditions
8bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * are met:
9bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * 1. Redistributions of source code must retain the above copyright
10bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman *    notice, this list of conditions and the following disclaimer.
11bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * 2. Redistributions in binary form must reproduce the above copyright
12bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman *    notice, this list of conditions and the following disclaimer in the
13bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman *    documentation and/or other materials provided with the distribution.
14bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman *
15bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman */
26bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman
27bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman#include "includes.h"
28bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman#ifdef USE_PAM
29bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman
30bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman#if !defined(SSHD_PAM_SERVICE)
31bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman# define SSHD_PAM_SERVICE		__progname
32bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman#endif
33bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman
34bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid start_pam(Authctxt *);
35bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid finish_pam(void);
36bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanu_int do_pam_account(void);
37bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid do_pam_session(void);
38bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid do_pam_set_tty(const char *);
39bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid do_pam_setcred(int );
40bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid do_pam_chauthtok(void);
41bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanint do_pam_putenv(char *, char *);
42bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanchar ** fetch_pam_environment(void);
43bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanchar ** fetch_pam_child_environment(void);
44bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid free_pam_environment(char **);
45bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid sshpam_thread_cleanup(void);
46bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanvoid sshpam_cleanup(void);
47bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanint sshpam_auth_passwd(Authctxt *, const char *);
48bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartmanint is_pam_session_open(void);
49bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman
50bd77cf78387b72b7b3ea870459077672bf75c3b5Greg Hartman#endif /* USE_PAM */
51