diff options
author | netblue30 <netblue30@protonmail.com> | 2023-11-02 08:34:59 -0400 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-11-07 17:55:14 -0300 |
commit | 520508d5be10e7579635193d24bc1ff004ed682b (patch) | |
tree | 32b2df274a144365e68c57e3735b30ddc0b9b68f /src/firejail/firejail.h | |
parent | landlock: apply rules in sandbox before app start (diff) | |
download | firejail-520508d5be10e7579635193d24bc1ff004ed682b.tar.gz firejail-520508d5be10e7579635193d24bc1ff004ed682b.tar.zst firejail-520508d5be10e7579635193d24bc1ff004ed682b.zip |
landlock: avoid parsing landlock commands twice
Diffstat (limited to 'src/firejail/firejail.h')
-rw-r--r-- | src/firejail/firejail.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h index 43325de62..f9f4cb473 100644 --- a/src/firejail/firejail.h +++ b/src/firejail/firejail.h | |||
@@ -152,6 +152,12 @@ typedef struct profile_entry_t { | |||
152 | 152 | ||
153 | typedef struct landlock_entry_t { | 153 | typedef struct landlock_entry_t { |
154 | struct landlock_entry_t *next; | 154 | struct landlock_entry_t *next; |
155 | #define LL_READ 0 | ||
156 | #define LL_WRITE 1 | ||
157 | #define LL_SPECIAL 2 | ||
158 | #define LL_EXEC 3 | ||
159 | #define LL_MAX 4 | ||
160 | int type; | ||
155 | char *data; | 161 | char *data; |
156 | } LandlockEntry; | 162 | } LandlockEntry; |
157 | 163 | ||
@@ -968,7 +974,7 @@ int ll_special(const char *allowed_path); | |||
968 | int ll_exec(const char *allowed_path); | 974 | int ll_exec(const char *allowed_path); |
969 | int ll_basic_system(void); | 975 | int ll_basic_system(void); |
970 | int ll_restrict(__u32 flags); | 976 | int ll_restrict(__u32 flags); |
971 | void ll_add_profile(const char *data); | 977 | void ll_add_profile(int type, const char *data); |
972 | #else | 978 | #else |
973 | static inline int ll_get_fd(void) { return -1; } | 979 | static inline int ll_get_fd(void) { return -1; } |
974 | static inline int ll_read(...) { return 0; } | 980 | static inline int ll_read(...) { return 0; } |