2
* Copyright (C) 2015 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef SNAP_CONFINE_SECCOMP_SUPPORT_H
18
#define SNAP_CONFINE_SECCOMP_SUPPORT_H
23
* Prepare seccomp profile associated with the security tag.
25
* This function loads the seccomp profile from
26
* /var/lib/snapd/seccomp/profiles/$SECURITY_TAG and stores it into
27
* scmp_filter_ctx object.
29
* The object is returned to the caller and can be made effective with a call
30
* to sc_load_seccomp_context(). The returned value should be cleaned up with
33
* This function calls die() on all errors.
36
scmp_filter_ctx sc_prepare_seccomp_context(const char *security_tag);
39
* Load a seccomp context.
41
* This function calls seccomp_load(3) and handles errors if it fails.
43
void sc_load_seccomp_context(scmp_filter_ctx ctx);