2 * AppArmor security module
4 * This file contains AppArmor file mediation function definitions.
6 * Copyright 2017 Canonical Ltd.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation, version 2 of the
18 #include <linux/path.h>
24 #define AA_MAY_PIVOTROOT 0x01
25 #define AA_MAY_MOUNT 0x02
26 #define AA_MAY_UMOUNT 0x04
27 #define AA_AUDIT_DATA 0x40
28 #define AA_MNT_CONT_MATCH 0x40
30 #define AA_MS_IGNORE_MASK (MS_KERNMOUNT | MS_NOSEC | MS_ACTIVE | MS_BORN)
32 int aa_remount(struct aa_label
*label
, const struct path
*path
,
33 unsigned long flags
, void *data
);
35 int aa_bind_mount(struct aa_label
*label
, const struct path
*path
,
36 const char *old_name
, unsigned long flags
);
39 int aa_mount_change_type(struct aa_label
*label
, const struct path
*path
,
42 int aa_move_mount(struct aa_label
*label
, const struct path
*path
,
43 const char *old_name
);
45 int aa_new_mount(struct aa_label
*label
, const char *dev_name
,
46 const struct path
*path
, const char *type
, unsigned long flags
,
49 int aa_umount(struct aa_label
*label
, struct vfsmount
*mnt
, int flags
);
51 int aa_pivotroot(struct aa_label
*label
, const struct path
*old_path
,
52 const struct path
*new_path
);
54 #endif /* __AA_MOUNT_H */