diff options
| author | grunfink <grunfink@comam.es> | 2025-06-03 03:31:31 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-06-03 03:31:31 +0200 |
| commit | 89c1a4a94b1032aed3af293c0f04d7a8f058ccda (patch) | |
| tree | e91751238268f0756bc4abe099d6afbf0db4ed65 | |
| parent | 27caa511503b55af87483702aacc6051cc412f82 (diff) | |
Fixed regression while sending email via pipe on OpenBSD.
| -rw-r--r-- | sandbox.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -13,6 +13,8 @@ void sbox_enter(const char *basedir) return; } + int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications")); + srv_debug(1, xs_fmt("Calling unveil()")); unveil(basedir, "rwc"); unveil("/tmp", "rwc"); @@ -25,6 +27,9 @@ void sbox_enter(const char *basedir) if (*address == '/') unveil(address, "rwc"); + if (smail) + unveil("/usr/sbin/sendmail", "x"); + unveil(NULL, NULL); srv_debug(1, xs_fmt("Calling pledge()")); @@ -34,6 +39,9 @@ void sbox_enter(const char *basedir) if (*address == '/') p = xs_str_cat(p, " unix"); + if (smail) + p = xs_str_cat(p, " exec"); + pledge(p, NULL); } |