blob: 41a963c5144f3afd180b0a08cb36c2aed9aa1df2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* Copyright (C) 2020 Daniel Golle <daniel@makrotopia.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _JAIL_SECCOMP_OCI_H_
#define _JAIL_SECCOMP_OCI_H_
#include <stdbool.h>
#include <stdint.h>
#include <linux/filter.h>
#ifdef SECCOMP_SUPPORT
extern const char * const seccomp_linker_base[];
extern const char * const seccomp_init_base[];
extern const char * const seccomp_loader_files[];
#else
static const char * const seccomp_linker_base[] = { NULL };
static const char * const seccomp_init_base[] = { NULL };
static const char * const seccomp_loader_files[] = { NULL };
#endif
struct sock_fprog *parseOCIlinuxseccomp(struct blob_attr *msg,
const char * const *extra_allow);
struct sock_fprog *seccomp_oci_audit_filter(const struct sock_fprog *prog);
struct sock_fprog *seccomp_deny_delta(const char * const *names,
const struct sock_fprog *app);
int applyOCIlinuxseccomp(struct sock_fprog *prog, const char *container_id,
const char *bundle_path);
bool seccomp_oci_needs_inproc(void);
bool seccomp_profile_covers(const struct sock_fprog *prog, const char * const *names);
#ifndef SECCOMP_SUPPORT
struct sock_fprog *parseOCIlinuxseccomp(struct blob_attr *msg,
const char * const *extra_allow) {
return NULL;
}
struct sock_fprog *seccomp_oci_audit_filter(const struct sock_fprog *prog) {
return NULL;
}
int applyOCIlinuxseccomp(struct sock_fprog *prog, const char *container_id,
const char *bundle_path) {
return ENOTSUP;
}
bool seccomp_oci_needs_inproc(void) {
return false;
}
#endif
#endif
|