commit e0b573502e97109a2383ba55a08e39d0b1891d7f from: Stefan Sperling date: Tue Mar 12 10:56:50 2019 UTC 'got ref -l' can do without cpath and fattr pledges commit - 7143d404530ce5fa5c9f2aea9d293d4de857d0e7 commit + e0b573502e97109a2383ba55a08e39d0b1891d7f blob - 38d57624513d9fc98ccc71cf54de3b6da0dc79ef blob + bae036809c6294a731832bedff5d12763eda61d3 --- got/got.c +++ got/got.c @@ -1792,9 +1792,15 @@ cmd_ref(int argc, char *argv[]) usage_ref(); #ifndef PROFILE - if (pledge("stdio rpath wpath cpath fattr flock proc exec sendfd " - "unveil", NULL) == -1) - err(1, "pledge"); + if (do_list) { + if (pledge("stdio rpath wpath flock proc exec sendfd unveil", + NULL) == -1) + err(1, "pledge"); + } else { + if (pledge("stdio rpath wpath cpath fattr flock proc exec " + "sendfd unveil", NULL) == -1) + err(1, "pledge"); + } #endif cwd = getcwd(NULL, 0); if (cwd == NULL) {