From 32ed43bd3a9fccb14cf80585039a8130a808a380 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Fri, 2 Jan 2009 17:40:06 -0500 Subject: [PATCH] --- yaml --- r: 126831 b: refs/heads/master c: 76f7ba35d4b5219fcc4cb072134c020ec77d030d h: refs/heads/master i: 126829: 15b7d0896e68a8eed53694deaac97d0e7e0d79df 126827: bc45155eb7b307b7aa7d05ca66504424f237cb79 126823: 34db4d9d5b7117f0d7827c9e6e3ff54ad60b19bf 126815: 2e80a379c3ae7b7a43e1426049a27b51d774b0ad v: v3 --- [refs] | 2 +- trunk/security/selinux/avc.c | 16 +++++++++------- trunk/security/selinux/include/avc_ss.h | 4 ++-- trunk/security/selinux/ss/context.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index a5a9552f1e5e..2592971ea396 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 14eaddc967b16017d4a1a24d2be6c28ecbe06ed8 +refs/heads/master: 76f7ba35d4b5219fcc4cb072134c020ec77d030d diff --git a/trunk/security/selinux/avc.c b/trunk/security/selinux/avc.c index d43bd6baeeaa..eb41f43e2772 100644 --- a/trunk/security/selinux/avc.c +++ b/trunk/security/selinux/avc.c @@ -53,18 +53,20 @@ static const char *class_to_string[] = { #undef S_ static const struct av_inherit av_inherit[] = { -#define S_(c, i, b) { c, common_##i##_perm_to_string, b }, +#define S_(c, i, b) { .tclass = c,\ + .common_pts = common_##i##_perm_to_string,\ + .common_base = b }, #include "av_inherit.h" #undef S_ }; const struct selinux_class_perm selinux_class_perm = { - av_perm_to_string, - ARRAY_SIZE(av_perm_to_string), - class_to_string, - ARRAY_SIZE(class_to_string), - av_inherit, - ARRAY_SIZE(av_inherit) + .av_perm_to_string = av_perm_to_string, + .av_pts_len = ARRAY_SIZE(av_perm_to_string), + .class_to_string = class_to_string, + .cts_len = ARRAY_SIZE(class_to_string), + .av_inherit = av_inherit, + .av_inherit_len = ARRAY_SIZE(av_inherit) }; #define AVC_CACHE_SLOTS 512 diff --git a/trunk/security/selinux/include/avc_ss.h b/trunk/security/selinux/include/avc_ss.h index c0d314d9f8e1..bb1ec801bdfe 100644 --- a/trunk/security/selinux/include/avc_ss.h +++ b/trunk/security/selinux/include/avc_ss.h @@ -17,16 +17,16 @@ struct av_perm_to_string { }; struct av_inherit { - u16 tclass; const char **common_pts; u32 common_base; + u16 tclass; }; struct selinux_class_perm { const struct av_perm_to_string *av_perm_to_string; u32 av_pts_len; - const char **class_to_string; u32 cts_len; + const char **class_to_string; const struct av_inherit *av_inherit; u32 av_inherit_len; }; diff --git a/trunk/security/selinux/ss/context.h b/trunk/security/selinux/ss/context.h index 658c2bd17da8..d9dd7a2f6a8a 100644 --- a/trunk/security/selinux/ss/context.h +++ b/trunk/security/selinux/ss/context.h @@ -27,9 +27,9 @@ struct context { u32 user; u32 role; u32 type; + u32 len; /* length of string in bytes */ struct mls_range range; char *str; /* string representation if context cannot be mapped. */ - u32 len; /* length of string in bytes */ }; static inline void mls_context_init(struct context *c)