| 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 ...
|