blob: 4b7adfccf6d80f1510d5416215c4f7c1601b8c89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef SANDBOXING_H
#define SANDBOXING_H
#include <stdlib.h>
#include <linux/landlock.h>
// returns -1 for error
int create_new_landlock_ruleset(struct landlock_ruleset_attr* ruleset_attr);
// returns false for error
bool landlock_add_path_rule(int landlock_fd, const struct landlock_ruleset_attr* ruleset_attr, const char* path, struct landlock_path_beneath_attr* path_beneath);
// closes landlock_fd
// returns false for error
bool landlock_enforce(int landlock_fd);
#endif // SANDBOXING_H
|