| b6ea2513 | 21-Aug-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tzcode: Limit TZ for setugid programs
The zoneinfo parser can be told to read any file the program can access by setting TZ to either an absolute path, or a path relative to the zoneinfo directory.
tzcode: Limit TZ for setugid programs
The zoneinfo parser can be told to read any file the program can access by setting TZ to either an absolute path, or a path relative to the zoneinfo directory. For setugid programs, we previously had a hack from OpenBSD which rejects values of TZ deemed unsafe, but that was rather arbitrary (anything containing a dot, for instance). Leverage openat() with AT_RESOLVE_BENEATH instead.
For simplicity, move the TZ change detection code to after we've opened the file, and stat the file descriptor rather than the name.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D52029
show more ...
|
| 57ee5657 | 18-Jul-2025 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
libc: Test time zone change detection.
While here, clean the detection code up a bit.
Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.
libc: Test time zone change detection.
While here, clean the detection code up a bit.
Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51343
show more ...
|
| 2aad7570 | 13-Jan-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tzcode: Silence warnings.
* Ignore failure to remove our temp file. * Avoid a minor memory leak in the -D case.
Reported by: Coverity (CID 1502534, 1502535, 1502538) MFC after: 1 week Sponsored by:
tzcode: Silence warnings.
* Ignore failure to remove our temp file. * Avoid a minor memory leak in the -D case.
Reported by: Coverity (CID 1502534, 1502535, 1502538) MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38038
show more ...
|
| 55572cff | 13-Jan-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tzcode: Fully initialize structs before use.
Reported by: Coverity (CID 1502542, 1502548) MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38037 |
| 96e68c39 | 13-Jan-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
tzcode: Avoid memory leak if pthread_setspecific() fails.
Reported by: Coverity (CID 1018472, 1018474) MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/
tzcode: Avoid memory leak if pthread_setspecific() fails.
Reported by: Coverity (CID 1018472, 1018474) MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38036
show more ...
|