aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/support.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 19:05:18 -0800
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:26:02 -0800
commit2fab298d986f0dec0f655884083c78d4cd0a08ff (patch)
tree3fb48879b8a0f0a14518fb6963febe68218e21b0 /modules/pam_unix/support.c
parentbd01c7eaabdecde8fbf697b17d70e3596aeaf83f (diff)
parentaa0448336a79d85579464f023ac87675be60abfc (diff)
downloadpam-2fab298d986f0dec0f655884083c78d4cd0a08ff.tar.gz
pam-2fab298d986f0dec0f655884083c78d4cd0a08ff.tar.bz2
pam-2fab298d986f0dec0f655884083c78d4cd0a08ff.zip
merge upstream version 1.1.1
Diffstat (limited to 'modules/pam_unix/support.c')
-rw-r--r--modules/pam_unix/support.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
index 050e0dc1..2a47d157 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -19,7 +19,9 @@
#include <ctype.h>
#include <syslog.h>
#include <sys/resource.h>
+#ifdef HAVE_RPCSVC_YPCLNT_H
#include <rpcsvc/ypclnt.h>
+#endif
#include <security/_pam_macros.h>
#include <security/pam_modules.h>
@@ -275,6 +277,7 @@ int _unix_getpwnam(pam_handle_t *pamh, const char *name,
}
}
+#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
if (!matched && nis) {
char *userinfo = NULL, *domain = NULL;
int len = 0, i;
@@ -293,6 +296,10 @@ int _unix_getpwnam(pam_handle_t *pamh, const char *name,
}
}
}
+#else
+ /* we don't have NIS support, make compiler happy. */
+ nis = 0;
+#endif
if (matched && (ret != NULL)) {
*ret = NULL;