commit eb6600df992a05d6bfd1e3c07ee2d18427cb6286 from: Stefan Sperling date: Fri Jan 04 16:40:37 2019 UTC apply unveil(2) to 'tog diff' commit - c2db6724337c437ae8baf3af7238503eaf44a06b commit + eb6600df992a05d6bfd1e3c07ee2d18427cb6286 blob - 461e5d1d972ae9af1d82ad77b899dd0cbfcf1bfb blob + 842187bfe46e04d7f18ec41db5d5295175ffe0ed --- tog/tog.c +++ tog/tog.c @@ -2112,8 +2112,8 @@ cmd_diff(int argc, char *argv[]) struct tog_view *view; #ifndef PROFILE - if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd", NULL) - == -1) + if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil", + NULL) == -1) err(1, "pledge"); #endif @@ -2144,6 +2144,10 @@ cmd_diff(int argc, char *argv[]) id_str2 = argv[2]; } else usage_diff(); + + error = apply_unveil(repo_path, NULL); + if (error) + goto done; error = got_repo_open(&repo, repo_path); free(repo_path);