@@ -62,15 +62,18 @@ struct linux_binprm;
62
62
#define TOMOYO_ROOT_NAME_LEN (sizeof(TOMOYO_ROOT_NAME) - 1)
63
63
64
64
/* Index numbers for Access Controls. */
65
- #define TOMOYO_MAC_FOR_FILE 0 /* domain_policy.conf */
66
- #define TOMOYO_MAX_ACCEPT_ENTRY 1
67
- #define TOMOYO_VERBOSE 2
68
- #define TOMOYO_MAX_CONTROL_INDEX 3
65
+ enum tomoyo_mac_index {
66
+ TOMOYO_MAC_FOR_FILE , /* domain_policy.conf */
67
+ TOMOYO_MAX_ACCEPT_ENTRY ,
68
+ TOMOYO_VERBOSE ,
69
+ TOMOYO_MAX_CONTROL_INDEX
70
+ };
69
71
70
72
/* Index numbers for Access Controls. */
71
-
72
- #define TOMOYO_TYPE_SINGLE_PATH_ACL 0
73
- #define TOMOYO_TYPE_DOUBLE_PATH_ACL 1
73
+ enum tomoyo_acl_entry_type_index {
74
+ TOMOYO_TYPE_SINGLE_PATH_ACL ,
75
+ TOMOYO_TYPE_DOUBLE_PATH_ACL ,
76
+ };
74
77
75
78
/* Index numbers for File Controls. */
76
79
@@ -83,44 +86,50 @@ struct linux_binprm;
83
86
* automatically cleared if TYPE_READ_WRITE_ACL is cleared.
84
87
*/
85
88
86
- #define TOMOYO_TYPE_READ_WRITE_ACL 0
87
- #define TOMOYO_TYPE_EXECUTE_ACL 1
88
- #define TOMOYO_TYPE_READ_ACL 2
89
- #define TOMOYO_TYPE_WRITE_ACL 3
90
- #define TOMOYO_TYPE_CREATE_ACL 4
91
- #define TOMOYO_TYPE_UNLINK_ACL 5
92
- #define TOMOYO_TYPE_MKDIR_ACL 6
93
- #define TOMOYO_TYPE_RMDIR_ACL 7
94
- #define TOMOYO_TYPE_MKFIFO_ACL 8
95
- #define TOMOYO_TYPE_MKSOCK_ACL 9
96
- #define TOMOYO_TYPE_MKBLOCK_ACL 10
97
- #define TOMOYO_TYPE_MKCHAR_ACL 11
98
- #define TOMOYO_TYPE_TRUNCATE_ACL 12
99
- #define TOMOYO_TYPE_SYMLINK_ACL 13
100
- #define TOMOYO_TYPE_REWRITE_ACL 14
101
- #define TOMOYO_TYPE_IOCTL_ACL 15
102
- #define TOMOYO_TYPE_CHMOD_ACL 16
103
- #define TOMOYO_TYPE_CHOWN_ACL 17
104
- #define TOMOYO_TYPE_CHGRP_ACL 18
105
- #define TOMOYO_TYPE_CHROOT_ACL 19
106
- #define TOMOYO_TYPE_MOUNT_ACL 20
107
- #define TOMOYO_TYPE_UMOUNT_ACL 21
108
- #define TOMOYO_MAX_SINGLE_PATH_OPERATION 22
109
-
110
- #define TOMOYO_TYPE_LINK_ACL 0
111
- #define TOMOYO_TYPE_RENAME_ACL 1
112
- #define TOMOYO_TYPE_PIVOT_ROOT_ACL 2
113
- #define TOMOYO_MAX_DOUBLE_PATH_OPERATION 3
114
-
115
- #define TOMOYO_DOMAINPOLICY 0
116
- #define TOMOYO_EXCEPTIONPOLICY 1
117
- #define TOMOYO_DOMAIN_STATUS 2
118
- #define TOMOYO_PROCESS_STATUS 3
119
- #define TOMOYO_MEMINFO 4
120
- #define TOMOYO_SELFDOMAIN 5
121
- #define TOMOYO_VERSION 6
122
- #define TOMOYO_PROFILE 7
123
- #define TOMOYO_MANAGER 8
89
+ enum tomoyo_path_acl_index {
90
+ TOMOYO_TYPE_READ_WRITE_ACL ,
91
+ TOMOYO_TYPE_EXECUTE_ACL ,
92
+ TOMOYO_TYPE_READ_ACL ,
93
+ TOMOYO_TYPE_WRITE_ACL ,
94
+ TOMOYO_TYPE_CREATE_ACL ,
95
+ TOMOYO_TYPE_UNLINK_ACL ,
96
+ TOMOYO_TYPE_MKDIR_ACL ,
97
+ TOMOYO_TYPE_RMDIR_ACL ,
98
+ TOMOYO_TYPE_MKFIFO_ACL ,
99
+ TOMOYO_TYPE_MKSOCK_ACL ,
100
+ TOMOYO_TYPE_MKBLOCK_ACL ,
101
+ TOMOYO_TYPE_MKCHAR_ACL ,
102
+ TOMOYO_TYPE_TRUNCATE_ACL ,
103
+ TOMOYO_TYPE_SYMLINK_ACL ,
104
+ TOMOYO_TYPE_REWRITE_ACL ,
105
+ TOMOYO_TYPE_IOCTL_ACL ,
106
+ TOMOYO_TYPE_CHMOD_ACL ,
107
+ TOMOYO_TYPE_CHOWN_ACL ,
108
+ TOMOYO_TYPE_CHGRP_ACL ,
109
+ TOMOYO_TYPE_CHROOT_ACL ,
110
+ TOMOYO_TYPE_MOUNT_ACL ,
111
+ TOMOYO_TYPE_UMOUNT_ACL ,
112
+ TOMOYO_MAX_SINGLE_PATH_OPERATION
113
+ };
114
+
115
+ enum tomoyo_path2_acl_index {
116
+ TOMOYO_TYPE_LINK_ACL ,
117
+ TOMOYO_TYPE_RENAME_ACL ,
118
+ TOMOYO_TYPE_PIVOT_ROOT_ACL ,
119
+ TOMOYO_MAX_DOUBLE_PATH_OPERATION
120
+ };
121
+
122
+ enum tomoyo_securityfs_interface_index {
123
+ TOMOYO_DOMAINPOLICY ,
124
+ TOMOYO_EXCEPTIONPOLICY ,
125
+ TOMOYO_DOMAIN_STATUS ,
126
+ TOMOYO_PROCESS_STATUS ,
127
+ TOMOYO_MEMINFO ,
128
+ TOMOYO_SELFDOMAIN ,
129
+ TOMOYO_VERSION ,
130
+ TOMOYO_PROFILE ,
131
+ TOMOYO_MANAGER
132
+ };
124
133
125
134
/********** Structure definitions. **********/
126
135
0 commit comments