]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/lxcseccomp.h
Merge pull request #2345 from flx42/seccomp-fixes
[mirror_lxc.git] / src / lxc / lxcseccomp.h
CommitLineData
8f2c3a70
SH
1/*
2 * lxc: linux Container library
3 *
4 * (C) Copyright Canonical, Inc. 2012
5 *
6 * Authors:
7 * Serge Hallyn <serge.hallyn@canonical.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
250b1eec 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8f2c3a70
SH
22 */
23
f1a4a029
ÇO
24#ifndef __LXC_LXCSECCOMP_H
25#define __LXC_LXCSECCOMP_H
8f2c3a70
SH
26
27#include "conf.h"
28
29#ifdef HAVE_SECCOMP
30int lxc_seccomp_load(struct lxc_conf *conf);
31int lxc_read_seccomp_config(struct lxc_conf *conf);
769872f9 32void lxc_seccomp_free(struct lxc_conf *conf);
8f2c3a70
SH
33#else
34static inline int lxc_seccomp_load(struct lxc_conf *conf) {
35 return 0;
36}
37
38static inline int lxc_read_seccomp_config(struct lxc_conf *conf) {
39 return 0;
40}
769872f9
SH
41
42static inline void lxc_seccomp_free(struct lxc_conf *conf) {
43 if (conf->seccomp) {
44 free(conf->seccomp);
45 conf->seccomp = NULL;
46 }
47}
8f2c3a70
SH
48#endif
49
50#endif