commit - 912564c60f24463c0a2f2eb20ed38218f3af8f9e
commit + aecbd69f01c1704f53ea8d3834274a189884f27c
blob - 6819af700aea6673b5f8cc16eb64715eca20b86d
blob + f7e05f377454beb72ae2e034ae81a3aa461fa35f
--- main.c
+++ main.c
#include <limits.h>
#include <netdb.h>
#include <opensmtpd.h>
+#include <paths.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdarg.h>
OpenSSL_add_all_digests();
- if (pledge("tmppath stdio dns", NULL) == -1)
+ if (unveil(_PATH_TMP, "rwc") == -1)
+ osmtpd_err(1, "unveil");
+ if (pledge("stdio rpath wpath cpath dns", NULL) == -1)
osmtpd_err(1, "pledge");
while ((ch = getopt(argc, argv, "A")) != -1) {