47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
|
index 5151a1e..831d456 100644
|
|
--- a/lib/rpc_subs.c
|
|
+++ b/lib/rpc_subs.c
|
|
@@ -52,7 +52,7 @@
|
|
/* Get numeric value of the n bits starting at position p */
|
|
#define getbits(x, p, n) ((x >> (p + 1 - n)) & ~(~0 << n))
|
|
|
|
-static char *ypdomain = NULL;
|
|
+static char *domain = NULL;
|
|
|
|
inline void dump_core(void);
|
|
static pthread_mutex_t networks_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|
@@ -946,8 +946,8 @@ static int name_match(const char *name, const char *pattern)
|
|
else {
|
|
ret = !memcmp(name, pattern, strlen(pattern));
|
|
/* Name could still be a netgroup (Solaris) */
|
|
- if (!ret && ypdomain)
|
|
- ret = innetgr(pattern, name, NULL, ypdomain);
|
|
+ if (!ret)
|
|
+ ret = innetgr(pattern, name, NULL, domain);
|
|
}
|
|
|
|
return ret;
|
|
@@ -1228,8 +1228,8 @@ static int host_match(char *pattern)
|
|
if (gethostname(myname, MAXHOSTNAMELEN))
|
|
return 0;
|
|
|
|
- if (yp_get_default_domain(&ypdomain))
|
|
- ypdomain = NULL;
|
|
+ if (yp_get_default_domain(&domain))
|
|
+ domain = NULL;
|
|
|
|
if (*m_pattern == '@') {
|
|
/*
|
|
@@ -1237,8 +1237,8 @@ static int host_match(char *pattern)
|
|
* spec or it's a netgroup.
|
|
*/
|
|
ret = match_network(m_pattern + 1);
|
|
- if (!ret && ypdomain)
|
|
- ret = innetgr(m_pattern + 1, myname, NULL, ypdomain);
|
|
+ if (!ret)
|
|
+ ret = innetgr(m_pattern + 1, myname, NULL, domain);
|
|
} else if (*m_pattern == '.') {
|
|
size_t m_len = strlen(m_pattern);
|
|
char *has_dot = strchr(myname, '.');
|