logger: temporarily disable Capsicum when a host is provided

We don't have a way to send a UDP package.

PR:		245314
Reported by:	dch
Discussed with:	emaste
This commit is contained in:
Mariusz Zaborski 2020-04-08 18:43:00 +00:00
parent 28540ab153
commit d86cc38525

View File

@ -181,8 +181,10 @@ main(int argc, char *argv[])
err(1, "Unable to contact Casper"); err(1, "Unable to contact Casper");
caph_cache_catpages(); caph_cache_catpages();
caph_cache_tzdata(); caph_cache_tzdata();
if (caph_enter() < 0) if (nsock == 0) {
err(1, "Unable to enter capability mode"); if (caph_enter() < 0)
err(1, "Unable to enter capability mode");
}
capsyslog = cap_service_open(capcas, "system.syslog"); capsyslog = cap_service_open(capcas, "system.syslog");
if (capsyslog == NULL) if (capsyslog == NULL)
err(1, "Unable to open system.syslog service"); err(1, "Unable to open system.syslog service");