Skip to content

Commit 2f5d8a3

Browse files
snapshot: adding unlinkat to seccomp
1 parent 67e3474 commit 2f5d8a3

File tree

4 files changed

+87
-69
lines changed

4 files changed

+87
-69
lines changed

src/app/firedancer/config/default.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ user = ""
14891489
#
14901490
# In development, you can disable the sandbox for testing and
14911491
# debugging with the `--no-sandbox` argument to `firedancer-dev`.
1492-
sandbox = false
1492+
sandbox = true
14931493

14941494
# As part of the security sandboxing, Firedancer will run every tile
14951495
# in a separate process. This can be annoying for debugging where

src/disco/topo/fd_topo_run.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ fd_topo_run_tile( fd_topo_t * topo,
105105
}
106106

107107

108-
struct sock_filter seccomp_filter[ 128UL ];
108+
struct sock_filter seccomp_filter[ 256UL ];
109109
ulong seccomp_filter_cnt = 0UL;
110110
if( FD_LIKELY( tile_run->populate_allowed_seccomp ) ) {
111111
seccomp_filter_cnt = tile_run->populate_allowed_seccomp( topo,

src/discof/restore/fd_snaprd_tile.seccomppolicy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,13 @@ setsockopt: (and (not (or (eq (arg 0) 2)
127127
renameat: (and (eq (arg 0) dir_fd)
128128
(eq (arg 2) dir_fd))
129129

130+
# snapshot: the temporary snapshot files are unlinked if just local
131+
# snapshot directories are loaded in.
132+
#
133+
# arg 0 is the file descriptor for the directory that the temporary
134+
# files are located in
135+
unlinkat: (and (eq (arg 0) dir_fd)
136+
(eq (arg 2) 0))
137+
130138
# shutdown: exit is called on shutdown
131139
exit: (eq (arg 0) 0)

0 commit comments

Comments
 (0)