When setting time, date(1) pledges "wpath" for logwtmp(3). Restrict
authorflorian <florian@openbsd.org>
Mon, 19 Sep 2022 15:36:20 +0000 (15:36 +0000)
committerflorian <florian@openbsd.org>
Mon, 19 Sep 2022 15:36:20 +0000 (15:36 +0000)
commitd54c1ef4ddad668bd10a4515bcf2d01d4a20d166
tree79014b1dc70f75b43df3e3a4b95535de81d1387a
parent6327ba2c0d3dbaac4d272ac21cf42006a9a32006
When setting time, date(1) pledges "wpath" for logwtmp(3). Restrict
this using unveil(2), but ignore errors if /var/log doesn't exist. We
want to be able to set the time if the system is damanged or /var is
not mounted yet.
We also need to unveil everything for reading since we still allow
arbitrary locations of zone info files. Hopefully that will go away
soon.
OK deraadt
bin/date/date.c