diff options
| author | 2025-01-06 07:33:23 +0100 | |
|---|---|---|
| committer | 2025-01-06 07:33:23 +0100 | |
| commit | c3be99bcf4989118e9ec7cc6a4f05b0842029122 (patch) | |
| tree | 52fa22b2632423de19c46832bfe4d9f4199f68b5 | |
| parent | Updated documentation. (diff) | |
| download | penes-snac2-c3be99bcf4989118e9ec7cc6a4f05b0842029122.tar.gz penes-snac2-c3be99bcf4989118e9ec7cc6a4f05b0842029122.tar.xz penes-snac2-c3be99bcf4989118e9ec7cc6a4f05b0842029122.zip | |
Fixed sandboxing of the unix socket.
| -rw-r--r-- | sandbox.c | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -63,8 +63,14 @@ LL_BEGIN(sbox_enter_linux_, const char* basedir, const char *address, int smail) | |||
| 63 | if (mtime("/etc/pki") > 0) | 63 | if (mtime("/etc/pki") > 0) |
| 64 | LL_PATH("/etc/pki", rf ); | 64 | LL_PATH("/etc/pki", rf ); |
| 65 | 65 | ||
| 66 | if (*address == '/') | 66 | if (*address == '/') { |
| 67 | LL_PATH(address, s); | 67 | /* the directory holding the socket must be allowed */ |
| 68 | xs *l = xs_split(address, "/"); | ||
| 69 | l = xs_list_del(l, -1); | ||
| 70 | xs *sdir = xs_join(l, "/"); | ||
| 71 | |||
| 72 | LL_PATH(sdir, s); | ||
| 73 | } | ||
| 68 | 74 | ||
| 69 | if (smail) | 75 | if (smail) |
| 70 | LL_PATH("/usr/sbin/sendmail", x); | 76 | LL_PATH("/usr/sbin/sendmail", x); |