selinux: const strings in tables
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 5 Mar 2010 05:59:03 +0000 (21:59 -0800)
committerJames Morris <jmorris@namei.org>
Sun, 7 Mar 2010 22:33:53 +0000 (09:33 +1100)
Several places strings tables are used that should be declared
const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/hooks.c
security/selinux/include/initial_sid_to_string.h
security/selinux/ss/policydb.c

index 9a2ee84..e1202cb 100644 (file)
@@ -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",
index d4fac82..a59b64e 100644 (file)
@@ -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",
index f036672..6236198 100644 (file)
@@ -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",