From: Stephen Hemminger Date: Fri, 5 Mar 2010 05:59:03 +0000 (-0800) Subject: selinux: const strings in tables X-Git-Tag: upstream/snapshot3+hdmi~14583^2^2~57^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=634a539e16bd7a1ba31c3f832baa725565cc9f96;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git selinux: const strings in tables Several places strings tables are used that should be declared const. Signed-off-by: Stephen Hemminger Signed-off-by: James Morris --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 9a2ee84..e1202cb 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -329,7 +329,7 @@ extern int ss_initialized; /* The file system's label must be initialized prior to use. */ -static char *labeling_behaviors[6] = { +static const char *labeling_behaviors[6] = { "uses xattr", "uses transition SIDs", "uses task SIDs", diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h index d4fac82..a59b64e 100644 --- a/security/selinux/include/initial_sid_to_string.h +++ b/security/selinux/include/initial_sid_to_string.h @@ -1,5 +1,5 @@ /* This file is automatically generated. Do not edit. */ -static char *initial_sid_to_string[] = +static const char *initial_sid_to_string[] = { "null", "kernel", diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index f036672..6236198 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -40,7 +40,7 @@ #define _DEBUG_HASHES #ifdef DEBUG_HASHES -static char *symtab_name[SYM_NUM] = { +static const char *symtab_name[SYM_NUM] = { "common prefixes", "classes", "roles",