aboutsummaryrefslogtreecommitdiff
path: root/sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox.c')
-rw-r--r--sandbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sandbox.c b/sandbox.c
index c45587a..7f26d0a 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -26,9 +26,9 @@ void sbox_enter(const char *basedir)
const char *address = xs_dict_get(srv_config, "address");
-#if defined (__OpenBSD__)
int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications"));
+#if defined (__OpenBSD__)
srv_debug(1, xs_fmt("Calling unveil()"));
unveil(basedir, "rwc");
unveil("/tmp", "rwc");
@@ -161,6 +161,9 @@ void sbox_enter(const char *basedir)
if (*address == '/')
LANDLOCK_PATH(address, LL_UNIX);
+ if (smail)
+ LANDLOCK_PATH("/usr/sbin/sendmail", LL_X);
+
if (abi > 3) {
if (*address != '/') {
LANDLOCK_PORT(