RHEL (and perhaps other Linux distros) use the string "(none)"
instead of an empty string when there is no actual NIS-style domain name. Bug #596
This commit is contained in:
@@ -789,7 +789,8 @@ netgr_matches(char *netgr, char *lhost, char *shost, char *user)
|
|||||||
/* get the domain name (if any) */
|
/* get the domain name (if any) */
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
domain = (char *) emalloc(HOST_NAME_MAX + 1);
|
domain = (char *) emalloc(HOST_NAME_MAX + 1);
|
||||||
if (getdomainname(domain, HOST_NAME_MAX + 1) == -1 || *domain == '\0') {
|
if (getdomainname(domain, HOST_NAME_MAX + 1) == -1 || *domain == '\0' ||
|
||||||
|
strcmp(domain, "(none)") == 0) {
|
||||||
efree(domain);
|
efree(domain);
|
||||||
domain = NULL;
|
domain = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user