From 8815d529d603bc3460f3d639e85e4bbc9df000e2 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 23 Sep 2022 16:58:33 +0000 Subject: [PATCH] Since tzset(3) ignores arbitrary files, we no longer need rpath and can depend on the /usr/share/zoneinfo bypass. OK mestre, millert, deraadt --- bin/date/date.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/date/date.c b/bin/date/date.c index 36d738a8fdb..0330ffc5f57 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.58 2022/09/19 15:36:20 florian Exp $ */ +/* $OpenBSD: date.c,v 1.59 2022/09/23 16:58:33 florian Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -113,7 +113,7 @@ main(int argc, char *argv[]) argc--; } - if (pledge("stdio rpath", NULL) == -1) + if (pledge("stdio", NULL) == -1) err(1, "pledge"); if (*argv && **argv == '+') { @@ -145,11 +145,9 @@ setthetime(char *p, const char *pformat) time_t now; int yearset = 0; - if (unveil("/", "r") == -1) - err(1, "unveil /"); /* Let us set the time even if logwtmp would fail. */ unveil("/var/log/wtmp", "w"); - if (pledge("stdio settime rpath wpath", NULL) == -1) + if (pledge("stdio settime wpath", NULL) == -1) err(1, "pledge"); lt = localtime(&tval); -- 2.20.1