Fix visible matching for fake and +x-hidden hosts.
[srvx.git] / src / tools.c
index 445006a2fa3b7516b696bbee888e18bdb5f9ced5..0da95dd62006c2273139afd5d1fdc6251c9e3608 100644 (file)
@@ -614,7 +614,8 @@ user_matches_glob(struct userNode *user, const char *orig_glob, int flags)
             return 1;
     }
     /* If only matching the visible hostnames, bail early. */
-    if ((flags & MATCH_VISIBLE) && (IsFakeHost(user) || IsHiddenHost(user)))
+    if ((flags & MATCH_VISIBLE) && IsHiddenHost(user)
+        && (IsFakeHost(user) || (hidden_host_suffix && user->handle_info)))
         return 0;
     /* If it might be an IP glob, test that. */
     if (!glob[strspn(glob, "0123456789./*?")]