commit - fb3d08c1f0590014fcb4230feb8fda8fa056773e
commit + 4b877649af0f6237f46cf7d033fc896aa7cf8ca6
blob - 952b4a1a2dca0bec9854e2ffa1d6c084b622dcb8
blob + be90c6eac055f1d4c56762e1d6655255bffed9cd
--- sandbox.c
+++ sandbox.c
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include "fs.h"
#include "telescope.h"
#ifdef __OpenBSD__
if (unveil(path, "rwc") == -1)
err(1, "unveil");
- strlcpy(path, getenv("HOME"), sizeof(path));
- strlcat(path, "/.telescope/", sizeof(path));
- if (unveil(path, "rwc") == -1)
+ if (unveil(config_path_base, "rwc") == -1)
err(1, "unveil");
+ if (unveil(data_path_base, "rwc") == -1)
+ err(1, "unveil");
+
+ if (unveil(cache_path_base, "rwc") == -1)
+ err(1, "unveil");
+
if (pledge("stdio rpath wpath cpath sendfd", NULL) == -1)
err(1, "pledge");
}