diff options
-rw-r--r-- | src/firejail/landlock.c | 6 | ||||
-rw-r--r-- | src/firejail/profile.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/firejail/landlock.c b/src/firejail/landlock.c index 453ad8f10..44d7eeafa 100644 --- a/src/firejail/landlock.c +++ b/src/firejail/landlock.c | |||
@@ -294,4 +294,10 @@ void ll_add_profile(int type, const char *data) { | |||
294 | ptr->next = entry; | 294 | ptr->next = entry; |
295 | } | 295 | } |
296 | 296 | ||
297 | #else | ||
298 | void ll_add_profile(int type, const char *data) { | ||
299 | (void) type; | ||
300 | (void) data; | ||
301 | } | ||
302 | |||
297 | #endif /* HAVE_LANDLOCK */ | 303 | #endif /* HAVE_LANDLOCK */ |
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 4e0b17a8c..62767f8dc 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -1073,7 +1073,9 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
1073 | return 0; | 1073 | return 0; |
1074 | } | 1074 | } |
1075 | 1075 | ||
1076 | #ifdef HAVE_LANDLOCK | 1076 | //#ifdef HAVE_LANDLOCK |
1077 | // landlock_connon.inc included by derfault in landlock.profile | ||
1078 | // all landlcok functions are empty in case landlock is not available in the kernel | ||
1077 | if (strncmp(ptr, "landlock.enforce", 16) == 0) { | 1079 | if (strncmp(ptr, "landlock.enforce", 16) == 0) { |
1078 | arg_landlock_enforce = 1; | 1080 | arg_landlock_enforce = 1; |
1079 | return 0; | 1081 | return 0; |
@@ -1098,7 +1100,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
1098 | ll_add_profile(LL_FS_EXEC, ptr + 20); | 1100 | ll_add_profile(LL_FS_EXEC, ptr + 20); |
1099 | return 0; | 1101 | return 0; |
1100 | } | 1102 | } |
1101 | #endif | 1103 | //#endif |
1102 | 1104 | ||
1103 | // memory deny write&execute | 1105 | // memory deny write&execute |
1104 | if (strcmp(ptr, "memory-deny-write-execute") == 0) { | 1106 | if (strcmp(ptr, "memory-deny-write-execute") == 0) { |