checkseapp: remove data types form static map
Data type tracking is no longer needed now that per
key validation routines are supported.
Change-Id: I2f1d0d5b1713e0477996479b0f279a58f43f15c7
Signed-off-by: William Roberts <william.c.roberts@intel.com>
diff --git a/tools/check_seapp.c b/tools/check_seapp.c
index 50f1837..aca294f 100644
--- a/tools/check_seapp.c
+++ b/tools/check_seapp.c
@@ -80,14 +80,6 @@
dir_in, dir_out
};
-/**
- * The expected "type" of data the value in the key
- * value pair should be.
- */
-enum data_type {
- dt_bool, dt_string
-};
-
struct list_element {
list_element *next;
};
@@ -110,7 +102,6 @@
struct key_map {
char *name;
key_dir dir;
- data_type type;
char *data;
key_map_regex regex;
bool (*fn_validate)(char *value, char **errmsg);
@@ -210,19 +201,19 @@
*/
key_map rules[] = {
/*Inputs*/
- { .name = "isSystemServer", .type = dt_bool, .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
- { .name = "isOwner", .type = dt_bool, .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
- { .name = "user", .type = dt_string, .dir = dir_in, .data = NULL },
- { .name = "seinfo", .type = dt_string, .dir = dir_in, .data = NULL },
- { .name = "name", .type = dt_string, .dir = dir_in, .data = NULL },
- { .name = "path", .type = dt_string, .dir = dir_in, .data = NULL },
- { .name = "isPrivApp", .type = dt_bool, .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
+ { .name = "isSystemServer", .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
+ { .name = "isOwner", .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
+ { .name = "user", .dir = dir_in, .data = NULL },
+ { .name = "seinfo", .dir = dir_in, .data = NULL },
+ { .name = "name", .dir = dir_in, .data = NULL },
+ { .name = "path", .dir = dir_in, .data = NULL },
+ { .name = "isPrivApp", .dir = dir_in, .data = NULL, .fn_validate = validate_bool },
/*Outputs*/
- { .name = "domain", .type = dt_string, .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_type },
- { .name = "type", .type = dt_string, .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_type },
- { .name = "levelFromUid", .type = dt_bool, .dir = dir_out, .data = NULL, .fn_validate = validate_bool },
- { .name = "levelFrom", .type = dt_string, .dir = dir_out, .data = NULL, .fn_validate = validate_levelFrom },
- { .name = "level", .type = dt_string, .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_level },
+ { .name = "domain", .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_type },
+ { .name = "type", .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_type },
+ { .name = "levelFromUid", .dir = dir_out, .data = NULL, .fn_validate = validate_bool },
+ { .name = "levelFrom", .dir = dir_out, .data = NULL, .fn_validate = validate_levelFrom },
+ { .name = "level", .dir = dir_out, .data = NULL, .fn_validate = validate_selinux_level },
};
/**
@@ -518,9 +509,6 @@
mB = &(rmB->m[j]);
input_mode = 0;
- if (mA->type != mB->type)
- continue;
-
if (strcmp(mA->name, mB->name))
continue;