commit 69e2f7200332153e8dd19ba643dc552c6f26ac6e from: Stefan Sperling via: Thomas Adam date: Thu Apr 25 14:57:36 2024 UTC use pledge("stdio") late in got-fetch-http, currently as early as possible commit - cf87b1d1df52185fa21efde684c398a2d1c61d1d commit + 69e2f7200332153e8dd19ba643dc552c6f26ac6e 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;