pam_permit.c revision 1.1
11.1Schristos/*- 21.1Schristos * Copyright 2001 Mark R V Murray 31.1Schristos * All rights reserved. 41.1Schristos * 51.1Schristos * Redistribution and use in source and binary forms, with or without 61.1Schristos * modification, are permitted provided that the following conditions 71.1Schristos * are met: 81.1Schristos * 1. Redistributions of source code must retain the above copyright 91.1Schristos * notice, this list of conditions and the following disclaimer. 101.1Schristos * 2. Redistributions in binary form must reproduce the above copyright 111.1Schristos * notice, this list of conditions and the following disclaimer in the 121.1Schristos * documentation and/or other materials provided with the distribution. 131.1Schristos * 141.1Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 151.1Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161.1Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 171.1Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 181.1Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 191.1Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201.1Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 211.1Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 221.1Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 231.1Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 241.1Schristos * SUCH DAMAGE. 251.1Schristos */ 261.1Schristos 271.1Schristos#include <sys/cdefs.h> 281.1Schristos__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_permit/pam_permit.c,v 1.8 2002/04/12 22:27:22 des Exp $"); 291.1Schristos 301.1Schristos#include <stddef.h> 311.1Schristos 321.1Schristos#define PAM_SM_AUTH 331.1Schristos#define PAM_SM_ACCOUNT 341.1Schristos#define PAM_SM_SESSION 351.1Schristos#define PAM_SM_PASSWORD 361.1Schristos 371.1Schristos#include <security/pam_appl.h> 381.1Schristos#include <security/pam_modules.h> 391.1Schristos 401.1SchristosPAM_EXTERN int 411.1Schristospam_sm_authenticate(pam_handle_t *pamh, int flags __unused, 421.1Schristos int argc __unused, const char *argv[] __unused) 431.1Schristos{ 441.1Schristos const char *user; 451.1Schristos int r; 461.1Schristos 471.1Schristos if ((r = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS) 481.1Schristos return (r); 491.1Schristos 501.1Schristos return (PAM_SUCCESS); 511.1Schristos} 521.1Schristos 531.1SchristosPAM_EXTERN int 541.1Schristospam_sm_setcred(pam_handle_t *pamh __unused, int flags __unused, 551.1Schristos int argc __unused, const char *argv[] __unused) 561.1Schristos{ 571.1Schristos 581.1Schristos return (PAM_SUCCESS); 591.1Schristos} 601.1Schristos 611.1SchristosPAM_EXTERN int 621.1Schristospam_sm_acct_mgmt(pam_handle_t *pamh __unused, int flags __unused, 631.1Schristos int argc __unused, const char *argv[] __unused) 641.1Schristos{ 651.1Schristos 661.1Schristos return (PAM_SUCCESS); 671.1Schristos} 681.1Schristos 691.1SchristosPAM_EXTERN int 701.1Schristospam_sm_chauthtok(pam_handle_t *pamh __unused, int flags __unused, 711.1Schristos int argc __unused, const char *argv[] __unused) 721.1Schristos{ 731.1Schristos 741.1Schristos return (PAM_SUCCESS); 751.1Schristos} 761.1Schristos 771.1SchristosPAM_EXTERN int 781.1Schristospam_sm_open_session(pam_handle_t *pamh __unused, int flags __unused, 791.1Schristos int argc __unused, const char *argv[] __unused) 801.1Schristos{ 811.1Schristos 821.1Schristos return (PAM_SUCCESS); 831.1Schristos} 841.1Schristos 851.1SchristosPAM_EXTERN int 861.1Schristospam_sm_close_session(pam_handle_t *pamh __unused, int flags __unused, 871.1Schristos int argc __unused, const char *argv[] __unused) 881.1Schristos{ 891.1Schristos 901.1Schristos return (PAM_SUCCESS); 911.1Schristos} 921.1Schristos 931.1SchristosPAM_MODULE_ENTRY("pam_permit"); 94