diff options
| author | 2024-11-19 21:45:21 +0100 | |
|---|---|---|
| committer | 2024-11-19 21:45:21 +0100 | |
| commit | 80ff16b21c7081165d346ff94b450f432a82ee47 (patch) | |
| tree | df22daee0146e1e4c3c1daf963850630946829c9 /sandbox.c | |
| parent | Merge remote-tracking branch 'upstream/master' (diff) | |
| download | penes-snac2-80ff16b21c7081165d346ff94b450f432a82ee47.tar.gz penes-snac2-80ff16b21c7081165d346ff94b450f432a82ee47.tar.xz penes-snac2-80ff16b21c7081165d346ff94b450f432a82ee47.zip | |
make sendmail executable if configured
Diffstat (limited to 'sandbox.c')
| -rw-r--r-- | sandbox.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -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( |