diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2025-08-21 16:34:32 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2025-08-21 18:59:37 +0000 |
commit | b6ea2513f7769ea9d9e4d342777111add2c903b0 (patch) | |
tree | 445d554094b9611d9a187ece717ef030302b3347 /usr.bin/finger/(public-mirror) | |
parent | f5efc804294c6bb24bd6d14bf2fb883a7320956c (diff) |
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
Diffstat (limited to 'usr.bin/finger/(public-mirror)')
0 files changed, 0 insertions, 0 deletions