From 8c715834cd61f2d50d53f9af85d3bd2f87a26c61 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Fri, 12 Apr 2013 12:49:55 +0200 Subject: pam_access: better not change the default function used to get domain name. modules/pam_access/pam_access.c (netgroup_match): As we did not use yp_get_default_domain() in the 1.1 branch due to typo in ifdef we should use it only as fallback. --- modules/pam_access/pam_access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/pam_access/pam_access.c') diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 55816dcb..a9cce510 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -471,9 +471,7 @@ netgroup_match (pam_handle_t *pamh, const char *netgroup, int retval; char *mydomain = NULL; -#ifdef HAVE_YP_GET_DEFAULT_DOMAIN - yp_get_default_domain(&mydomain); -#elif defined(HAVE_GETDOMAINNAME) +#if defined(HAVE_GETDOMAINNAME) char domainname_res[256]; if (getdomainname (domainname_res, sizeof (domainname_res)) == 0) @@ -483,6 +481,8 @@ netgroup_match (pam_handle_t *pamh, const char *netgroup, mydomain = domainname_res; } } +#elif defined(HAVE_YP_GET_DEFAULT_DOMAIN) + yp_get_default_domain(&mydomain); #endif #ifdef HAVE_INNETGR -- cgit v1.2.3