git: 24f4019b6a89 - main - syslogd: Block timezone updating in capability mode
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Nov 2024 22:27:13 UTC
The branch main has been updated by jfree: URL: https://cgit.FreeBSD.org/src/commit/?id=24f4019b6a898edde3159e930c3ab6ef88ce87c9 commit 24f4019b6a898edde3159e930c3ab6ef88ce87c9 Author: Jake Freeland <jfree@FreeBSD.org> AuthorDate: 2024-11-27 22:25:55 +0000 Commit: Jake Freeland <jfree@FreeBSD.org> CommitDate: 2024-11-27 22:25:55 +0000 syslogd: Block timezone updating in capability mode Do not update local timezone data upon reload when syslogd is compiled with libcasper support. Timezone files are pre-fetched using the caph_cache_tzdata() function before entering capability mode. Attempts to re-fetch these files will result in a capability violation. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41466 --- usr.sbin/syslogd/syslogd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index fcf7d4747706..755552ecd21c 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2508,7 +2508,12 @@ init(bool reload) LocalDomain = ""; } +#ifndef WITH_CASPER /* + * XXX: Disable when running in capability mode, for now. + * This requires a new interface in the tzcode module to + * get running without capability violations. + * * Load / reload timezone data (in case it changed). * * Just calling tzset() again does not work, the timezone code @@ -2525,6 +2530,7 @@ init(bool reload) tzset(); unsetenv("TZ"); } +#endif Initialized = false; closelogfiles();