diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-03-03 22:33:55 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-03-03 21:33:55 +0000 |
commit | f4e016bb697b7807dda2534e2a0d23c8b44de52f (patch) | |
tree | 6df76671fcc895f972ea4161c981bb3d86e58d95 /modules/pam_unix/support.c | |
parent | ac9965e29a1a4827c8ed28b7c73f972b4f15959f (diff) | |
download | pam-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/pam_unix/support.c')
-rw-r--r-- | modules/pam_unix/support.c | 2 |
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; |