]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/lxcseccomp.h
lxcseccomp: cleanup header
[mirror_lxc.git] / src / lxc / lxcseccomp.h
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
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #ifndef __LXC_LXCSECCOMP_H
25 #define __LXC_LXCSECCOMP_H
26
27 #include "conf.h"
28
29 #ifdef HAVE_SECCOMP
30 extern int lxc_seccomp_load(struct lxc_conf *conf);
31 extern int lxc_read_seccomp_config(struct lxc_conf *conf);
32 extern void lxc_seccomp_free(struct lxc_conf *conf);
33 #else
34 static inline int lxc_seccomp_load(struct lxc_conf *conf)
35 {
36 return 0;
37 }
38
39 static inline int lxc_read_seccomp_config(struct lxc_conf *conf)
40 {
41 return 0;
42 }
43
44 static inline void lxc_seccomp_free(struct lxc_conf *conf)
45 {
46 free(conf->seccomp);
47 conf->seccomp = NULL;
48 }
49 #endif
50
51 #endif