summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2010-09-28 21:04:44 +0000
committerArthur de Jong <arthur@arthurdejong.org>2010-09-28 21:04:44 +0000
commit25ae82f933be9668aaf4c1fe7a53f01ff1defab8 (patch)
tree2d0685382d5373d4ac82a4202a2cde573cf9b096 /compat
parent3a6a57b4aacc044de27636f7d42476a4a971b01f (diff)
begin merging some of the compatibility improvements from Ted C. Cheng of Symas Corporation
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1225 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'compat')
-rw-r--r--compat/nss_compat.h7
-rw-r--r--compat/pam_get_authtok.c10
2 files changed, 17 insertions, 0 deletions
diff --git a/compat/nss_compat.h b/compat/nss_compat.h
index 2e2cfb3..f38463e 100644
--- a/compat/nss_compat.h
+++ b/compat/nss_compat.h
@@ -2,6 +2,7 @@
nss_compat.h - compatibility definitions for NSS functions
Copyright (C) 2010 Arthur de Jong
+ Copyright (C) 2010 Symas Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -42,6 +43,12 @@
#ifdef HAVE_RPC_RPCENT_H
#include <rpc/rpcent.h>
#endif /* HAVE_RPC_RPCENT_H */
+#ifdef HAVE_NSS_DBDEFS_H
+#include <nss_dbdefs.h>
+#endif /* HAVE_NSS_DBDEFS_H */
+#ifdef HAVE_NSSWITCH_H
+#include <nsswitch.h>
+#endif /* HAVE_NSSWITCH_H */
#include "compat/ether.h"
diff --git a/compat/pam_get_authtok.c b/compat/pam_get_authtok.c
index 08e821c..a8271b2 100644
--- a/compat/pam_get_authtok.c
+++ b/compat/pam_get_authtok.c
@@ -2,6 +2,7 @@
pam_get_authtok.c - replacement function for pam_get_authtok()
Copyright (C) 2009 Arthur de Jong
+ Copyright (C) 2010 Symas Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -34,6 +35,15 @@
/* warning: this version assumes that try_first_pass is specified */
+/* find value of PAM_AUTHTOK_RECOVERY_ERR */
+#ifndef PAM_AUTHTOK_RECOVERY_ERR
+#ifdef PAM_AUTHTOK_RECOVER_ERR
+#define PAM_AUTHTOK_RECOVERY_ERR PAM_AUTHTOK_RECOVER_ERR
+#else
+#define PAM_AUTHTOK_RECOVERY_ERR 21 /* not defined anywhere */
+#endif
+#endif
+
int pam_get_authtok(pam_handle_t *pamh,int item,const char **authtok,const char *prompt)
{
int rc;