mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 07:13:36 +02:00
replace pledge "stdio rpath tmppath" with unveil "/tmp" "rwc" to satisfy
mktemp(3) type operations, unveil "/" "r" for reading all over the tree, and pledge "stdio rpath wpath cpath" to permit both unveils subject to their own limitations.
This commit is contained in:
@@ -2962,7 +2962,11 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
if (pledge ("stdio rpath tmppath", NULL) == -1)
|
||||
if (unveil ("/tmp", "rwc") == -1)
|
||||
fatal (_("Failed to unveil /tmp"));
|
||||
if (unveil ("/", "r") == -1)
|
||||
fatal (_("Failed to unveil /"));
|
||||
if (pledge ("stdio rpath wpath cpath", NULL) == -1)
|
||||
fatal (_("Failed to pledge"));
|
||||
|
||||
program_name = *argv;
|
||||
|
||||
Reference in New Issue
Block a user