git: 3b3a28975820 - main - syslogd: Fix function return test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Jul 2025 22:32:18 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=3b3a28975820b302a8bb8c69ef96a38d8a7c7aed
commit 3b3a28975820b302a8bb8c69ef96a38d8a7c7aed
Author: Nathan Huff <nhuff@acm.org>
AuthorDate: 2025-07-29 21:58:30 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-07-30 22:32:05 +0000
syslogd: Fix function return test
Looks like during the capsicum setup the return value for cap_syslogd
is checked twice rather than checking the return value of cap_net
after initializing the casper service.
Signed-off-by: Nathan Huff <nhuff@acm.org>
Fixes: 897240c7d666 ("syslogd: Enter capability mode")
Pull-request: https://github.com/freebsd/freebsd-src/pull/1796
---
usr.sbin/syslogd/syslogd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 726cedc17b1d..fe7427130b78 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -2571,7 +2571,7 @@ syslogd_cap_enter(void)
if (cap_syslogd == NULL)
err(1, "Failed to open the syslogd.casper libcasper service");
cap_net = cap_service_open(cap_casper, "system.net");
- if (cap_syslogd == NULL)
+ if (cap_net == NULL)
err(1, "Failed to open the system.net libcasper service");
cap_close(cap_casper);
limit = cap_net_limit_init(cap_net,