Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/compat/pam_compat.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2009-10-17 17:08:49 +0200
committerArthur de Jong <arthur@arthurdejong.org>2009-10-17 17:08:49 +0200
commit3d019ede58bd85317a1be1a25a8e45476deaf9c0 (patch)
tree26e558e0a103123c3b33e4cd62018a94b24eca0c /compat/pam_compat.h
parent5a3eb1df560f29c4692e01594fc63d22bb4c50ee (diff)
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
Diffstat (limited to 'compat/pam_compat.h')
-rw-r--r--compat/pam_compat.h41
1 files changed, 41 insertions, 0 deletions
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 <security/pam_appl.h>
+#endif /* HAVE_SECURITY_PAM_APPL_H */
+#ifndef HAVE_PAM_PAM_MODULES_H
+#include <security/pam_modules.h>
+#ifdef HAVE_SECURITY_PAM_EXT_H
+#include <security/pam_ext.h>
+#endif /* HAVE_SECURITY_PAM_EXT_H */
+#else /* not HAVE_PAM_PAM_MODULES_H */
+#include <pam/pam_modules.h>
+#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 */