From 36a53978e763d1849a5f2dc3719825cd3494615b Mon Sep 17 00:00:00 2001 From: oshogbo Date: Wed, 8 Apr 2020 18:43:00 +0000 Subject: [PATCH] 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 --- usr.bin/logger/logger.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 7b1dd3136c40..44aa8ed3bae1 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -181,8 +181,10 @@ main(int argc, char *argv[]) err(1, "Unable to contact Casper"); caph_cache_catpages(); caph_cache_tzdata(); - if (caph_enter() < 0) - err(1, "Unable to enter capability mode"); + if (nsock == 0) { + if (caph_enter() < 0) + err(1, "Unable to enter capability mode"); + } capsyslog = cap_service_open(capcas, "system.syslog"); if (capsyslog == NULL) err(1, "Unable to open system.syslog service");