From f4e016bb697b7807dda2534e2a0d23c8b44de52f Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sun, 3 Mar 2024 22:33:55 +0100 Subject: 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 --- modules/pam_unix/support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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; -- cgit v1.2.3