]>
git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/apparmor.h
3 * Copyright © 2012 Serge Hallyn <serge.hallyn@ubuntu.com>.
4 * Copyright © 2012 Canonical Ltd.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <lxc/start.h> /* for lxc_handler */
27 * apparmor_handler_init is really just a wrapper around check_apparmor_enabled
28 * to allow us to keep from having #ifdef APPARMOR in start.c
30 extern void apparmor_handler_init(struct lxc_handler
*handler
);
33 extern char *aa_get_profile(pid_t pid
);
34 extern int do_apparmor_load(int aa_enabled
, char *aa_profile
,
35 int umount_proc
, int dropprivs
);
36 extern int apparmor_load(struct lxc_handler
*handler
);
37 extern int attach_apparmor(char *profile
);
38 extern int lsm_mount_proc_if_needed(char *root_src
, char *rootfs_tgt
);
40 static inline char *aa_get_profile(pid_t pid
) {
43 static inline int do_apparmor_load(int aa_enabled
, char *aa_profile
,
44 int umount_proc
, int dropprivs
) {
47 static inline int attach_apparmor(char *profile
) {
50 static inline int apparmor_load(struct lxc_handler
*handler
) {
53 static inline int lsm_mount_proc_if_needed(char *root_src
, char *rootfs_tgt
) {