summaryrefslogtreecommitdiff
path: root/sandbox.c
diff options
context:
space:
mode:
authorGravatar shtrophic2024-11-19 21:45:21 +0100
committerGravatar shtrophic2024-11-19 21:45:21 +0100
commit80ff16b21c7081165d346ff94b450f432a82ee47 (patch)
treedf22daee0146e1e4c3c1daf963850630946829c9 /sandbox.c
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadsnac2-80ff16b21c7081165d346ff94b450f432a82ee47.tar.gz
snac2-80ff16b21c7081165d346ff94b450f432a82ee47.tar.xz
snac2-80ff16b21c7081165d346ff94b450f432a82ee47.zip
make sendmail executable if configured
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)
26 26
27 const char *address = xs_dict_get(srv_config, "address"); 27 const char *address = xs_dict_get(srv_config, "address");
28 28
29#if defined (__OpenBSD__)
30 int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications")); 29 int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications"));
31 30
31#if defined (__OpenBSD__)
32 srv_debug(1, xs_fmt("Calling unveil()")); 32 srv_debug(1, xs_fmt("Calling unveil()"));
33 unveil(basedir, "rwc"); 33 unveil(basedir, "rwc");
34 unveil("/tmp", "rwc"); 34 unveil("/tmp", "rwc");
@@ -161,6 +161,9 @@ void sbox_enter(const char *basedir)
161 if (*address == '/') 161 if (*address == '/')
162 LANDLOCK_PATH(address, LL_UNIX); 162 LANDLOCK_PATH(address, LL_UNIX);
163 163
164 if (smail)
165 LANDLOCK_PATH("/usr/sbin/sendmail", LL_X);
166
164 if (abi > 3) { 167 if (abi > 3) {
165 if (*address != '/') { 168 if (*address != '/') {
166 LANDLOCK_PORT( 169 LANDLOCK_PORT(