1*0d9d0fd8Schristos /* $NetBSD: pam_permit.c,v 1.8 2023/06/30 21:46:21 christos Exp $ */
244269bb5Schristos
344269bb5Schristos /*-
444269bb5Schristos * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
544269bb5Schristos * Copyright (c) 2004-2011 Dag-Erling Smørgrav
644269bb5Schristos * All rights reserved.
744269bb5Schristos *
844269bb5Schristos * This software was developed for the FreeBSD Project by ThinkSec AS and
944269bb5Schristos * Network Associates Laboratories, the Security Research Division of
1044269bb5Schristos * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
1144269bb5Schristos * ("CBOSS"), as part of the DARPA CHATS research program.
1244269bb5Schristos *
1344269bb5Schristos * Redistribution and use in source and binary forms, with or without
1444269bb5Schristos * modification, are permitted provided that the following conditions
1544269bb5Schristos * are met:
1644269bb5Schristos * 1. Redistributions of source code must retain the above copyright
1744269bb5Schristos * notice, this list of conditions and the following disclaimer.
1844269bb5Schristos * 2. Redistributions in binary form must reproduce the above copyright
1944269bb5Schristos * notice, this list of conditions and the following disclaimer in the
2044269bb5Schristos * documentation and/or other materials provided with the distribution.
2144269bb5Schristos * 3. The name of the author may not be used to endorse or promote
2244269bb5Schristos * products derived from this software without specific prior written
2344269bb5Schristos * permission.
2444269bb5Schristos *
2544269bb5Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2644269bb5Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2744269bb5Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2844269bb5Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2944269bb5Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3044269bb5Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3144269bb5Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3244269bb5Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3344269bb5Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3444269bb5Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3544269bb5Schristos * SUCH DAMAGE.
3644269bb5Schristos */
3744269bb5Schristos
3844269bb5Schristos #ifdef HAVE_CONFIG_H
3944269bb5Schristos # include "config.h"
4044269bb5Schristos #endif
4144269bb5Schristos
4244269bb5Schristos #include <sys/param.h>
4344269bb5Schristos
4444269bb5Schristos #include <security/pam_modules.h>
4544269bb5Schristos
4644269bb5Schristos PAM_EXTERN int
pam_sm_authenticate(pam_handle_t * pamh,int flags,int argc,const char * argv[])4744269bb5Schristos pam_sm_authenticate(pam_handle_t *pamh, int flags,
4844269bb5Schristos int argc, const char *argv[])
4944269bb5Schristos {
5044269bb5Schristos
5144269bb5Schristos (void)pamh;
5244269bb5Schristos (void)flags;
5344269bb5Schristos (void)argc;
5444269bb5Schristos (void)argv;
5544269bb5Schristos return (PAM_SUCCESS);
5644269bb5Schristos }
5744269bb5Schristos
5844269bb5Schristos PAM_EXTERN int
pam_sm_setcred(pam_handle_t * pamh,int flags,int argc,const char * argv[])5944269bb5Schristos pam_sm_setcred(pam_handle_t *pamh, int flags,
6044269bb5Schristos int argc, const char *argv[])
6144269bb5Schristos {
6244269bb5Schristos
6344269bb5Schristos (void)pamh;
6444269bb5Schristos (void)flags;
6544269bb5Schristos (void)argc;
6644269bb5Schristos (void)argv;
6744269bb5Schristos return (PAM_SUCCESS);
6844269bb5Schristos }
6944269bb5Schristos
7044269bb5Schristos PAM_EXTERN int
pam_sm_acct_mgmt(pam_handle_t * pamh,int flags,int argc,const char * argv[])7144269bb5Schristos pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
7244269bb5Schristos int argc, const char *argv[])
7344269bb5Schristos {
7444269bb5Schristos
7544269bb5Schristos (void)pamh;
7644269bb5Schristos (void)flags;
7744269bb5Schristos (void)argc;
7844269bb5Schristos (void)argv;
7944269bb5Schristos return (PAM_SUCCESS);
8044269bb5Schristos }
8144269bb5Schristos
8244269bb5Schristos PAM_EXTERN int
pam_sm_open_session(pam_handle_t * pamh,int flags,int argc,const char * argv[])8344269bb5Schristos pam_sm_open_session(pam_handle_t *pamh, int flags,
8444269bb5Schristos int argc, const char *argv[])
8544269bb5Schristos {
8644269bb5Schristos
8744269bb5Schristos (void)pamh;
8844269bb5Schristos (void)flags;
8944269bb5Schristos (void)argc;
9044269bb5Schristos (void)argv;
9144269bb5Schristos return (PAM_SUCCESS);
9244269bb5Schristos }
9344269bb5Schristos
9444269bb5Schristos PAM_EXTERN int
pam_sm_close_session(pam_handle_t * pamh,int flags,int argc,const char * argv[])9544269bb5Schristos pam_sm_close_session(pam_handle_t *pamh, int flags,
9644269bb5Schristos int argc, const char *argv[])
9744269bb5Schristos {
9844269bb5Schristos
9944269bb5Schristos (void)pamh;
10044269bb5Schristos (void)flags;
10144269bb5Schristos (void)argc;
10244269bb5Schristos (void)argv;
10344269bb5Schristos return (PAM_SUCCESS);
10444269bb5Schristos }
10544269bb5Schristos
10644269bb5Schristos PAM_EXTERN int
pam_sm_chauthtok(pam_handle_t * pamh,int flags,int argc,const char * argv[])10744269bb5Schristos pam_sm_chauthtok(pam_handle_t *pamh, int flags,
10844269bb5Schristos int argc, const char *argv[])
10944269bb5Schristos {
11044269bb5Schristos
11144269bb5Schristos (void)pamh;
11244269bb5Schristos (void)flags;
11344269bb5Schristos (void)argc;
11444269bb5Schristos (void)argv;
11544269bb5Schristos return (PAM_SUCCESS);
11644269bb5Schristos }
11744269bb5Schristos
11844269bb5Schristos PAM_MODULE_ENTRY("pam_permit");
119