Commit Diff
Diff:
1bcb98996d9263f4db8045d0b71c8029749ca0bf
d3d07147e45c1d13f2879130149ab354574e0f32
Commit:
d3d07147e45c1d13f2879130149ab354574e0f32
Tree:
b4b41403fd67bba1b44936e6a9983ece950aaaa5
Author:
Omar Polo <op@omarpolo.com>
Date:
Tue Aug 30 10:25:46 2022 UTC
Message:
specify why it's not using tmppath pledge promise

in theory `mexp' could use the tmppath pledge promise and drop
unveil("/tmp/", "rwc") BUT File::Temp checks whether /tmp exists.
Another option would be to unveil("/tmp", "r") and use tmppath, but that
could seem misleading.

(noticed after semarie@ reminded me of `tmppath')
commit - 1bcb98996d9263f4db8045d0b71c8029749ca0bf
commit + d3d07147e45c1d13f2879130149ab354574e0f32
blob - 034c9aba8c8aac1385b6ce31efa31acdbc3ac51f
blob + acfd9974e463b664ad9b3ba61bb7ddf9d965338e
--- mexp
+++ mexp
@@ -22,10 +22,12 @@ unveil("/tmp", "rwc") or die "unveil /tmp: $!";
unveil("/usr/local/bin/mshow", "rx") or die "unveil mshow: $!";
unveil($outdir, "rwc") or die "unveil $outdir: $!";
+
+# can't use tmppath because File::Temp checks whether /tmp exists.
unveil("/tmp", "rwc") or die "unveil /tmp: $!";
unveil(".", "r") or die "unveil .: $!";
-# fattr because of File::Temp somehow.
+# fattr for File::Temp
pledge("stdio rpath wpath cpath proc exec fattr") or die "pledge: $!";
my $tid;
Omar Polo