From 0205c0e6b0e7837c2369816a1a53d21e3e412a1f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 21 Apr 2026 05:54:50 +0100 Subject: lbutils: remove xpledge/xunveil, just call them direct Signed-off-by: Leah Rowe --- util/libreboot-utils/mkhtemp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'util/libreboot-utils/mkhtemp.c') diff --git a/util/libreboot-utils/mkhtemp.c b/util/libreboot-utils/mkhtemp.c index 86aab536..d2f32ef2 100644 --- a/util/libreboot-utils/mkhtemp.c +++ b/util/libreboot-utils/mkhtemp.c @@ -59,8 +59,11 @@ main(int argc, char *argv[]) (void) errhook(exit_cleanup); (void) lbsetprogname(argv[0]); +#ifdef __OpenBSD__ /* https://man.openbsd.org/pledge.2 */ - xpledgex("stdio flock rpath wpath cpath", NULL); + if (pledge("stdio flock rpath wpath cpath", NULL) == -1) + exitf("pledge"); +#endif while ((c = getopt(argc, argv, "qdp:")) != -1) { @@ -117,7 +120,10 @@ main(int argc, char *argv[]) tmpdir, template) < 0) exitf("%s", s); - xpledgex("stdio", NULL); +#ifdef __OpenBSD__ + if (pledge("stdio", NULL) == -1) + exitf("pledge"); +#endif if (s == NULL) exitf("bad string initialisation"); -- cgit v1.2.1