summaryrefslogtreecommitdiff
path: root/modules/pam_access
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_access')
-rw-r--r--modules/pam_access/pam_access.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 35b7d058..2669a5ec 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -478,12 +478,10 @@ netgroup_match (pam_handle_t *pamh, const char *netgroup,
if (getdomainname (domainname_res, sizeof (domainname_res)) == 0)
{
- if (strcmp (domainname_res, "(none)") == 0)
+ if (domainname_res[0] != '\0' && strcmp (domainname_res, "(none)") != 0)
{
- /* If domainname is not set, some systems will return "(none)" */
- domainname_res[0] = '\0';
- }
- mydomain = domainname_res;
+ mydomain = domainname_res;
+ }
}
#endif