aboutsummaryrefslogtreecommitdiff
path: root/sandbox.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-03-19 11:02:42 +0000
committerOmar Polo <op@omarpolo.com>2022-03-19 11:02:42 +0000
commite5d82d9472513ef742dbb0b5ac451337625feb58 (patch)
treef702b4f52830b6a8c111071b3f7d48213229d2eb /sandbox.c
parent9db5e7051ebb37a9078e79ca46daf7f8f8f3f963 (diff)
const-ify some tables
matches found with % grep -R '=[ ]*{' . | fgrep -v const
Diffstat (limited to 'sandbox.c')
-rw-r--r--sandbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sandbox.c b/sandbox.c
index 0ab50d1..d221260 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -246,7 +246,7 @@ sandbox_logger_process(void)
# error "Platform does not support seccomp filter yet"
#endif
-static struct sock_filter filter[] = {
+static const struct sock_filter filter[] = {
/* load the *current* architecture */
BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
(offsetof(struct seccomp_data, arch))),
@@ -438,7 +438,7 @@ open_landlock(void)
{
int fd;
- struct landlock_ruleset_attr attr = {
+ const struct landlock_ruleset_attr attr = {
.handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE |
LANDLOCK_ACCESS_FS_READ_FILE |
LANDLOCK_ACCESS_FS_READ_DIR |
@@ -556,7 +556,7 @@ logger_landlock(void)
void
sandbox_server_process(void)
{
- struct sock_fprog prog = {
+ const struct sock_fprog prog = {
.len = (unsigned short) (sizeof(filter) / sizeof(filter[0])),
.filter = filter,
};