mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
landlock fix for old kernel versions
This commit is contained in:
parent
04c458c4d1
commit
8259f66e1f
2 changed files with 10 additions and 2 deletions
|
|
@ -294,4 +294,10 @@ void ll_add_profile(int type, const char *data) {
|
|||
ptr->next = entry;
|
||||
}
|
||||
|
||||
#else
|
||||
void ll_add_profile(int type, const char *data) {
|
||||
(void) type;
|
||||
(void) data;
|
||||
}
|
||||
|
||||
#endif /* HAVE_LANDLOCK */
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,9 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LANDLOCK
|
||||
//#ifdef HAVE_LANDLOCK
|
||||
// landlock_connon.inc included by derfault in landlock.profile
|
||||
// all landlcok functions are empty in case landlock is not available in the kernel
|
||||
if (strncmp(ptr, "landlock.enforce", 16) == 0) {
|
||||
arg_landlock_enforce = 1;
|
||||
return 0;
|
||||
|
|
@ -1098,7 +1100,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
|
|||
ll_add_profile(LL_FS_EXEC, ptr + 20);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
// memory deny write&execute
|
||||
if (strcmp(ptr, "memory-deny-write-execute") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue