commit 29b6cbbaee05814fbac85312d69ee8ec76c92d82 from: Stefan Sperling date: Wed Apr 17 17:39:31 2024 UTC use pledge("stdio") late in got-fetch-http, currently as early as possible commit - c4caaee88e58b02fae4d446ceb99147ed9ed3b0e commit + 29b6cbbaee05814fbac85312d69ee8ec76c92d82 blob - 1cd6efe44c6ea8dbe180763fb07be941aa580ec2 blob + f443ed57aaa607502d7aade2e884676a1cfe4b79 --- libexec/got-fetch-http/got-fetch-http.c +++ libexec/got-fetch-http/got-fetch-http.c @@ -431,7 +431,11 @@ upload_request(int https, const char *host, const char if ((sock = dial(https, host, port)) == -1) return -1; - +#ifndef PROFILE + /* TODO: can we push this upwards such that get_refs() is covered? */ + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); +#endif if (bufio_init(&bio)) { warnx("bufio_init"); goto err;