]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/lxcseccomp.h
Merge pull request #2951 from tomponline/tp-typo
[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 26
cdb2a47f
CB
27#include <errno.h>
28#ifdef HAVE_SECCOMP
29#include <seccomp.h>
30#endif
31
8f2c3a70
SH
32#include "conf.h"
33
34#ifdef HAVE_SECCOMP
5fdc4e77
CB
35extern int lxc_seccomp_load(struct lxc_conf *conf);
36extern int lxc_read_seccomp_config(struct lxc_conf *conf);
37extern void lxc_seccomp_free(struct lxc_conf *conf);
cdb2a47f
CB
38extern int seccomp_notify_handler(int fd, uint32_t events, void *data,
39 struct lxc_epoll_descr *descr);
40
8f2c3a70 41#else
5fdc4e77
CB
42static inline int lxc_seccomp_load(struct lxc_conf *conf)
43{
8f2c3a70
SH
44 return 0;
45}
46
5fdc4e77
CB
47static inline int lxc_read_seccomp_config(struct lxc_conf *conf)
48{
8f2c3a70
SH
49 return 0;
50}
769872f9 51
5fdc4e77
CB
52static inline void lxc_seccomp_free(struct lxc_conf *conf)
53{
54 free(conf->seccomp);
55 conf->seccomp = NULL;
769872f9 56}
cdb2a47f
CB
57static inline int seccomp_notify_handler(int fd, uint32_t events, void *data,
58 struct lxc_epoll_descr *descr)
59{
60 return -ENOSYS;
61}
8f2c3a70
SH
62#endif
63
64#endif