NagiosEnterprises / nagioscore

Nagios Core
GNU General Public License v2.0
1.48k stars 440 forks source link

Confusing error message when no members defined in host/service groups #925

Open tsadpbb opened 10 months ago

tsadpbb commented 10 months ago

What

If you define all of your host and service groups such that they do not have members, like so

define servicegroup {
    servicegroup_name   testservicegroup 
    alias   Sample Service Group  
    }

Then you get an authentication message: "It appears as though you do not have permission to view information for any of the hosts you requested..."

Why

In cgiauth.c around lines 300 and 329, if the temp_servicesmember and temp_hostsmember is already NULL, authorization returns false.

Suggestions to fix