commit 80ff16b

shtrophic  ·  2024-11-19 20:45:21 +0000 UTC
parent 6743113
make sendmail executable if configured
1 files changed,  +4, -1
+4, -1
 1@@ -26,9 +26,9 @@ void sbox_enter(const char *basedir)
 2 
 3     const char *address = xs_dict_get(srv_config, "address");
 4 
 5-#if defined (__OpenBSD__)
 6     int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications"));
 7 
 8+#if defined (__OpenBSD__)
 9     srv_debug(1, xs_fmt("Calling unveil()"));
10     unveil(basedir,                "rwc");
11     unveil("/tmp",                 "rwc");
12@@ -161,6 +161,9 @@ void sbox_enter(const char *basedir)
13     if (*address == '/')
14         LANDLOCK_PATH(address, LL_UNIX);
15 
16+    if (smail)
17+        LANDLOCK_PATH("/usr/sbin/sendmail", LL_X);
18+
19     if (abi > 3) {
20         if (*address != '/') {
21             LANDLOCK_PORT(