Alvar Penning
ea81780895
strip_exif support for the OpenBSD sandbox
...
Change the strip_exif logic to work with the already existing OpenBSD
sandbox and allow ffmpeg and mogrify to be executed.
The previous strip_exif implementation relied on system(3), effectively
starting "/bin/sh" and executing the required tool within a shell
session. Making this work in the sandbox would require to allow
executing "/bin/sh", rendering the sandbox useless.
Thus, the code now starts determining the absolute path of the tools -
unless they are given as ffmpeg_path or mogrify_path - and allowing them
to be executed via unveil(2). Then, instead of the system(3) call, the
good old fork(2) and execve(2) dance is performed.
The sbox_enter code was made aware of strip_exif, which resulted in a
pledge(2) violation before when disable_email_notifications was set to
false. Furthermore, the detected paths of the tools are now allowed.
2026-02-05 21:17:44 +01:00
grunfink
f0509f8b2b
Minor tweak.
2025-06-04 06:38:44 +02:00
grunfink
c2cac572e9
Don't enable unveil() and pledge() for sendmail spawn if "smtp_url" is set.
2025-06-04 06:35:39 +02:00
grunfink
89c1a4a94b
Fixed regression while sending email via pipe on OpenBSD.
2025-06-03 03:31:31 +02:00
shtrophic
b7320f580d
allow sandbox to work with changed config values
2025-04-29 23:42:34 +02:00
shtrophic
85be7f36e1
Merge remote-tracking branch 'upstream/master' into curl-smtp
2025-01-24 20:38:26 +01:00
shtrophic
cc1d4258e5
Sandbox fixes
...
- allow reading `/dev/urandom` as it is shown as a failed syscall when
tracing
- resolve `/etc/ssl/cert.pem` in case it is a symlink
2025-01-23 20:15:23 +01:00
shtrophic
4c1a2d24d3
add port parsing for sandboxing
2025-01-20 22:59:30 +01:00
default
51f3f49ba0
Don't fail Linux sandboxing if /usr/sbin/sendmail does not exist.
2025-01-06 15:35:18 +01:00
default
f1295a471f
Minor rework to sandbox code.
2025-01-06 15:22:13 +01:00
default
c3be99bcf4
Fixed sandboxing of the unix socket.
2025-01-06 07:33:23 +01:00
default
9b04a3c5fd
Disable sandboxing by default for now.
2025-01-05 16:19:15 +01:00
default
d479352548
Fixed crash in sandbox code under OpenBSD.
2025-01-05 15:27:51 +01:00
default
bcd34f4959
More sandbox compilation tweaks under Alpine Linux.
2025-01-05 14:00:13 +01:00
default
9c0dbd7ec3
Added some autodetection for Linux landlocking on older systems.
2025-01-05 13:52:05 +01:00
default
e2fccec1d9
New compilation variable WITHOUT_SANDBOX, to disable all sandboxing.
2025-01-05 13:36:39 +01:00
default
5af94dade6
Minor sandbox fix for Debian stable.
2025-01-05 13:20:08 +01:00
shtrophic
bbce5e32ca
use correct macros for compatibility
2024-12-30 11:18:08 +01:00
shtrophic
629a7953f9
use compat macros to compile on kernels without LANDLOCK_ACCESS_NET_*
2024-12-26 15:53:51 +01:00
shtrophic
f625b7f729
don't try to make files directory-readable
2024-12-08 09:01:57 +01:00
shtrophic
fb8145297c
make log output specific to landlock status
2024-12-08 08:54:00 +01:00
shtrophic
7d07d3bffd
cleanup rules
2024-12-08 08:51:02 +01:00
shtrophic
e52b4bf39b
import landloc.h
2024-12-05 17:24:04 +01:00
shtrophic
80ff16b21c
make sendmail executable if configured
2024-11-19 21:45:21 +01:00
shtrophic
972783fcb2
only rwc /dev/shm when WITHOUT_SHM is undefined
2024-11-19 20:47:15 +01:00
shtrophic
017140f523
remove unused headers
2024-11-16 13:50:16 +01:00
shtrophic
559f23c808
add distinction between RWC with directories and without, include FS_REFER permission
2024-11-16 13:47:26 +01:00
shtrophic
75f6159056
sandboxing port to linux via landlock
2024-11-16 00:54:12 +01:00