commit 8c715834cd61f2d50d53f9af85d3bd2f87a26c61
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Fri Apr 12 12:49:55 2013 +0200
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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 55816dc..a9cce51 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
Show replies by date