commit - 79b4ed580507388221abfe1530830fd6412dbae5f6a02074342ea1c4ba86ad53
commit + 55d7ca587a98f7868d6a835f1ce288e5d02e8cd8bdd28fe9fb28ef22db5e92c7
blob - f60e7855339e89439920f970a186ffed88203cfda5002fda1c14dd7ad666c6b9
blob + ddf507927763da566cd29a06d5f8c4802d47bff672fc0f2ca6399fde268cd77f
--- gotd/libexec/got-notify-http/got-notify-http.c
+++ gotd/libexec/got-notify-http/got-notify-http.c
#include <string.h>
#include <syslog.h>
#include <time.h>
+#include <tls.h>
#include <unistd.h>
#include <openssl/evp.h>
int ch, flags, ret, nonstd = 0;
#ifndef PROFILE
- if (pledge("stdio rpath tmppath dns inet", NULL) == -1)
+ const char *root_ca;
+ root_ca = tls_default_ca_cert_file();
+
+ if (unveil(root_ca, "r") == -1)
+ err(1, "unveil %s", root_ca);
+ if (unveil("/tmp/", "rwc") == -1)
+ err(1, "unveil /tmp");
+ if (pledge("stdio rpath wpath cpath dns inet", NULL) == -1)
err(1, "pledge");
#endif
fatal("fseeko");
#ifndef PROFILE
- /* drop tmppath */
+ /* drop wpath cpath */
if (pledge("stdio rpath dns inet", NULL) == -1)
err(1, "pledge");
#endif