1 /*
2  * AppArmor security module
3  *
4  * This file contains AppArmor filesystem definitions.
5  *
6  * Copyright (C) 1998-2008 Novell/SUSE
7  * Copyright 2009-2010 Canonical Ltd.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation, version 2 of the
12  * License.
13  */
14 
15 #ifndef __AA_APPARMORFS_H
16 #define __AA_APPARMORFS_H
17 
18 enum aa_fs_type {
19 	AA_FS_TYPE_FOPS,
20 	AA_FS_TYPE_DIR,
21 };
22 
23 struct aa_fs_entry;
24 
25 struct aa_fs_entry {
26 	const char *name;
27 	struct dentry *dentry;
28 	umode_t mode;
29 	enum aa_fs_type v_type;
30 	union {
31 		struct aa_fs_entry *files;
32 	} v;
33 	const struct file_operations *file_ops;
34 };
35 
36 #define AA_FS_FILE_FOPS(_name, _mode, _fops) \
37 	{ .name = (_name), .v_type = AA_FS_TYPE_FOPS, \
38 	  .mode = (_mode), .file_ops = (_fops) }
39 #define AA_FS_DIR(_name, _value) \
40 	{ .name = (_name), .v_type = AA_FS_TYPE_DIR, .v.files = (_value) }
41 
42 extern void __init aa_destroy_aafs(void);
43 
44 #endif /* __AA_APPARMORFS_H */
45