diff options
| author | 2025-06-04 06:35:39 +0200 | |
|---|---|---|
| committer | 2025-06-04 06:35:39 +0200 | |
| commit | c2cac572e9e51fc91296e0aa86ed3e165a75dd2d (patch) | |
| tree | a65fbc8bb63094852ad75170ac54cd8099a45650 /sandbox.c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-c2cac572e9e51fc91296e0aa86ed3e165a75dd2d.tar.gz snac2-c2cac572e9e51fc91296e0aa86ed3e165a75dd2d.tar.xz snac2-c2cac572e9e51fc91296e0aa86ed3e165a75dd2d.zip | |
Don't enable unveil() and pledge() for sendmail spawn if "smtp_url" is set.
Diffstat (limited to 'sandbox.c')
| -rw-r--r-- | sandbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -15,6 +15,11 @@ void sbox_enter(const char *basedir) | |||
| 15 | 15 | ||
| 16 | int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications")); | 16 | int smail = !xs_is_true(xs_dict_get(srv_config, "disable_email_notifications")); |
| 17 | 17 | ||
| 18 | const char *url = xs_dict_get(srv_config, "smtp_url"); | ||
| 19 | |||
| 20 | if (xs_is_string(url) && *url) | ||
| 21 | smail = 0; | ||
| 22 | |||
| 18 | srv_debug(1, xs_fmt("Calling unveil()")); | 23 | srv_debug(1, xs_fmt("Calling unveil()")); |
| 19 | unveil(basedir, "rwc"); | 24 | unveil(basedir, "rwc"); |
| 20 | unveil("/tmp", "rwc"); | 25 | unveil("/tmp", "rwc"); |