aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2024-03-03 22:33:55 +0100
committerDmitry V. Levin <ldv@strace.io>2024-03-03 21:33:55 +0000
commitf4e016bb697b7807dda2534e2a0d23c8b44de52f (patch)
tree6df76671fcc895f972ea4161c981bb3d86e58d95 /modules
parentac9965e29a1a4827c8ed28b7c73f972b4f15959f (diff)
downloadpam-f4e016bb697b7807dda2534e2a0d23c8b44de52f.tar.gz
pam-f4e016bb697b7807dda2534e2a0d23c8b44de52f.tar.bz2
pam-f4e016bb697b7807dda2534e2a0d23c8b44de52f.zip
pam_unix: use yp functions only if nis requested
It can happen that yp functions are found in system but their header files are not available. In this case, do not call them. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_unix/support.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
index 90f6bbe9..d11b2758 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -380,7 +380,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 defined(HAVE_NIS) && 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;