summaryrefslogtreecommitdiff
path: root/modules/pam_access/pam_access.c
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2013-04-12 12:49:55 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2013-04-12 12:49:55 +0200
commit8c715834cd61f2d50d53f9af85d3bd2f87a26c61 (patch)
tree90fc838ae1522afafc3c16dc80b059a705cf5d9d /modules/pam_access/pam_access.c
parent183f91a212879229d37e4dce18edd7a141eefa12 (diff)
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.
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r--modules/pam_access/pam_access.c6
1 files changed, 3 insertions, 3 deletions
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