diff options
-rw-r--r-- | security/selinux/avc.c | 16 | ||||
-rw-r--r-- | security/selinux/include/avc_ss.h | 4 | ||||
-rw-r--r-- | security/selinux/ss/context.h | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index d43bd6baeeaa..eb41f43e2772 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -53,18 +53,20 @@ static const char *class_to_string[] = { | |||
53 | #undef S_ | 53 | #undef S_ |
54 | 54 | ||
55 | static const struct av_inherit av_inherit[] = { | 55 | static const struct av_inherit av_inherit[] = { |
56 | #define S_(c, i, b) { c, common_##i##_perm_to_string, b }, | 56 | #define S_(c, i, b) { .tclass = c,\ |
57 | .common_pts = common_##i##_perm_to_string,\ | ||
58 | .common_base = b }, | ||
57 | #include "av_inherit.h" | 59 | #include "av_inherit.h" |
58 | #undef S_ | 60 | #undef S_ |
59 | }; | 61 | }; |
60 | 62 | ||
61 | const struct selinux_class_perm selinux_class_perm = { | 63 | const struct selinux_class_perm selinux_class_perm = { |
62 | av_perm_to_string, | 64 | .av_perm_to_string = av_perm_to_string, |
63 | ARRAY_SIZE(av_perm_to_string), | 65 | .av_pts_len = ARRAY_SIZE(av_perm_to_string), |
64 | class_to_string, | 66 | .class_to_string = class_to_string, |
65 | ARRAY_SIZE(class_to_string), | 67 | .cts_len = ARRAY_SIZE(class_to_string), |
66 | av_inherit, | 68 | .av_inherit = av_inherit, |
67 | ARRAY_SIZE(av_inherit) | 69 | .av_inherit_len = ARRAY_SIZE(av_inherit) |
68 | }; | 70 | }; |
69 | 71 | ||
70 | #define AVC_CACHE_SLOTS 512 | 72 | #define AVC_CACHE_SLOTS 512 |
diff --git a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h index c0d314d9f8e1..bb1ec801bdfe 100644 --- a/security/selinux/include/avc_ss.h +++ b/security/selinux/include/avc_ss.h | |||
@@ -17,16 +17,16 @@ struct av_perm_to_string { | |||
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct av_inherit { | 19 | struct av_inherit { |
20 | u16 tclass; | ||
21 | const char **common_pts; | 20 | const char **common_pts; |
22 | u32 common_base; | 21 | u32 common_base; |
22 | u16 tclass; | ||
23 | }; | 23 | }; |
24 | 24 | ||
25 | struct selinux_class_perm { | 25 | struct selinux_class_perm { |
26 | const struct av_perm_to_string *av_perm_to_string; | 26 | const struct av_perm_to_string *av_perm_to_string; |
27 | u32 av_pts_len; | 27 | u32 av_pts_len; |
28 | const char **class_to_string; | ||
29 | u32 cts_len; | 28 | u32 cts_len; |
29 | const char **class_to_string; | ||
30 | const struct av_inherit *av_inherit; | 30 | const struct av_inherit *av_inherit; |
31 | u32 av_inherit_len; | 31 | u32 av_inherit_len; |
32 | }; | 32 | }; |
diff --git a/security/selinux/ss/context.h b/security/selinux/ss/context.h index 658c2bd17da8..d9dd7a2f6a8a 100644 --- a/security/selinux/ss/context.h +++ b/security/selinux/ss/context.h | |||
@@ -27,9 +27,9 @@ struct context { | |||
27 | u32 user; | 27 | u32 user; |
28 | u32 role; | 28 | u32 role; |
29 | u32 type; | 29 | u32 type; |
30 | u32 len; /* length of string in bytes */ | ||
30 | struct mls_range range; | 31 | struct mls_range range; |
31 | char *str; /* string representation if context cannot be mapped. */ | 32 | char *str; /* string representation if context cannot be mapped. */ |
32 | u32 len; /* length of string in bytes */ | ||
33 | }; | 33 | }; |
34 | 34 | ||
35 | static inline void mls_context_init(struct context *c) | 35 | static inline void mls_context_init(struct context *c) |