aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/landlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/landlock.c')
-rw-r--r--src/firejail/landlock.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/firejail/landlock.c b/src/firejail/landlock.c
index 44d7eeafa..a360f155b 100644
--- a/src/firejail/landlock.c
+++ b/src/firejail/landlock.c
@@ -18,7 +18,6 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20 20
21#ifdef HAVE_LANDLOCK
22#include "firejail.h" 21#include "firejail.h"
23#include <linux/landlock.h> 22#include <linux/landlock.h>
24#include <sys/prctl.h> 23#include <sys/prctl.h>
@@ -27,6 +26,8 @@
27#include <errno.h> 26#include <errno.h>
28#include <fcntl.h> 27#include <fcntl.h>
29 28
29#ifdef HAVE_LANDLOCK
30
30static int ll_ruleset_fd = -1; 31static int ll_ruleset_fd = -1;
31static int ll_abi = -1; 32static int ll_abi = -1;
32 33
@@ -295,6 +296,17 @@ void ll_add_profile(int type, const char *data) {
295} 296}
296 297
297#else 298#else
299
300int ll_get_fd(void) {
301 return -1;
302}
303
304int ll_restrict(uint32_t flags) {
305 (void) flags;
306
307 return 0;
308}
309
298void ll_add_profile(int type, const char *data) { 310void ll_add_profile(int type, const char *data) {
299 (void) type; 311 (void) type;
300 (void) data; 312 (void) data;