Prechádzať zdrojové kódy

selinux: const strings in tables

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>
Stephen Hemminger 15 rokov pred
rodič
commit
634a539e16

+ 1 - 1
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",

+ 1 - 1
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",

+ 1 - 1
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",