diff options
| author | grunfink <grunfink@noreply.codeberg.org> | 2026-02-07 16:59:33 +0100 |
|---|---|---|
| committer | grunfink <grunfink@noreply.codeberg.org> | 2026-02-07 16:59:33 +0100 |
| commit | 841b726f71ba82635237d0064517a6dcb39a9067 (patch) | |
| tree | 13e196e417251737b580aa52966071f96baeff2c /sandbox.c | |
| parent | 79cf2cae3986c18be2830db79f9fcfd641a4c19d (diff) | |
| parent | ea81780895702b08b0b93ff48bd1876330632b89 (diff) | |
Merge pull request 'strip_exif support for the OpenBSD sandbox' (#548) from oxzi/snac2:strip-metadata-openbsd into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/548
Diffstat (limited to 'sandbox.c')
| -rw-r--r-- | sandbox.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -13,6 +13,8 @@ void sbox_enter(const char *basedir) return; } + const xs_val *strip_exif = xs_dict_get(srv_config, "strip_exif"); + int smail; const char *url = xs_dict_get(srv_config, "smtp_url"); @@ -33,6 +35,11 @@ void sbox_enter(const char *basedir) if (*address == '/') unveil(address, "rwc"); + if (strip_exif) { + unveil(xs_dict_get(srv_config, "ffmpeg_path"), "x"); + unveil(xs_dict_get(srv_config, "mogrify_path"), "x"); + } + if (smail) unveil("/usr/sbin/sendmail", "x"); @@ -45,7 +52,7 @@ void sbox_enter(const char *basedir) if (*address == '/') p = xs_str_cat(p, " unix"); - if (smail) + if (smail || strip_exif) p = xs_str_cat(p, " exec"); pledge(p, NULL); |