From 3d019ede58bd85317a1be1a25a8e45476deaf9c0 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 17 Oct 2009 15:08:49 +0000 Subject: provide a replacement for the pam_get_authtok() functions for systems without it git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1008 ef36b2f9-881f-0410-afb5-c4e39611909c --- compat/pam_compat.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 compat/pam_compat.h (limited to 'compat/pam_compat.h') diff --git a/compat/pam_compat.h b/compat/pam_compat.h new file mode 100644 index 0000000..5967638 --- /dev/null +++ b/compat/pam_compat.h @@ -0,0 +1,41 @@ +/* + pam_compat.h - provide a replacement definitions for some pam functions + + Copyright (C) 2009 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA +*/ + +#ifndef _COMPAT_PAM_COMPAT_H +#define _COMPAT_PAM_COMPAT_H 1 + +#ifdef HAVE_SECURITY_PAM_APPL_H +#include +#endif /* HAVE_SECURITY_PAM_APPL_H */ +#ifndef HAVE_PAM_PAM_MODULES_H +#include +#ifdef HAVE_SECURITY_PAM_EXT_H +#include +#endif /* HAVE_SECURITY_PAM_EXT_H */ +#else /* not HAVE_PAM_PAM_MODULES_H */ +#include +#endif /* not HAVE_PAM_PAM_MODULES_H */ + +#ifndef HAVE_PAM_GET_AUTHTOK +int pam_get_authtok(pam_handle_t *pamh,int item,const char **authtok,const char *prompt); +#endif /* HAVE_PAM_GET_AUTHTOK */ + +#endif /* _COMPAT_LDAP_COMPAT_H */ -- cgit v1.2.3