]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/bpf-restrict-fs.h
core: rename "bpf-lsm.[ch]" → "bpf-restrict-fs.[ch]"
[thirdparty/systemd.git] / src / core / bpf-restrict-fs.h
CommitLineData
184b4f78
ILG
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2#pragma once
3
4#include "hashmap.h"
5
e59ccd03
ILG
6typedef enum FilesystemParseFlags {
7 FILESYSTEM_PARSE_INVERT = 1 << 0,
8 FILESYSTEM_PARSE_ALLOW_LIST = 1 << 1,
9 FILESYSTEM_PARSE_LOG = 1 << 2,
10} FilesystemParseFlags;
11
184b4f78
ILG
12typedef struct Unit Unit;
13typedef struct Manager Manager;
14
15typedef struct restrict_fs_bpf restrict_fs_bpf;
16
ba187c9c 17bool lsm_bpf_supported(bool initialize);
184b4f78 18int lsm_bpf_setup(Manager *m);
b646fc32 19int lsm_bpf_restrict_filesystems(const Set *filesystems, uint64_t cgroup_id, int outer_map_fd, bool allow_list);
184b4f78
ILG
20int lsm_bpf_cleanup(const Unit *u);
21int lsm_bpf_map_restrict_fs_fd(Unit *u);
22void lsm_bpf_destroy(struct restrict_fs_bpf *prog);
e59ccd03
ILG
23int lsm_bpf_parse_filesystem(const char *name,
24 Set **filesystems,
25 FilesystemParseFlags flags,
26 const char *unit,
27 const char *filename,
28 unsigned line);