Call pledge(2) in fc-cache(1): "stdio rpath wpath cpath flock".

ok deraadt@
This commit is contained in:
bentley
2025-05-23 10:30:39 +00:00
parent fe9c23177e
commit 40f45b02de

View File

@@ -39,6 +39,7 @@
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_DIRENT_H
@@ -378,6 +379,10 @@ main (int argc, char **argv)
}
systemOnly = FcTrue;
}
if (pledge("stdio rpath wpath cpath flock", NULL) == -1)
err(1, "pledge");
if (systemOnly)
FcConfigEnableHome (FcFalse);
if (sysroot)