Lines Matching refs:value

99  * The workhorse of the logic. This struct maps key value pairs to
107 bool (*fn_validate)(char *value, char **errmsg);
111 * Key value pair struct, this represents the raw kvp values coming
116 char *value;
127 char *key; /** key value before hashing */
131 key_map m[]; /** key value mapping */
193 static bool validate_bool(char *value, char **errmsg);
194 static bool validate_levelFrom(char *value, char **errmsg);
195 static bool validate_selinux_type(char *value, char **errmsg);
196 static bool validate_selinux_level(char *value, char **errmsg);
197 static bool validate_uint(char *value, char **errmsg);
200 * The heart of the mapping process, this must be updated if a new key value pair is added
366 static bool validate_bool(char *value, char **errmsg) {
368 if (!strcmp("true", value) || !strcmp("false", value)) {
376 static bool validate_levelFrom(char *value, char **errmsg) {
378 if(strcasecmp(value, "none") && strcasecmp(value, "all") &&
379 strcasecmp(value, "app") && strcasecmp(value, "user")) {
386 static bool validate_selinux_type(char *value, char **errmsg) {
396 if(!check_type(pol.db, value)) {
404 static bool validate_selinux_level(char *value, char **errmsg) {
414 int ret = sepol_mls_check(pol.handle, pol.db, value);
416 *errmsg = "Expecting a valid SELinux MLS value";
423 static bool validate_uint(char *value, char **errmsg) {
427 longvalue = strtol(value, &endptr, 10);
455 char *value = m->data;
459 log_info("Validating %s=%s\n", key, value);
473 lineno, value, errstr, erroff);
481 rc = m->fn_validate(value, &errmsg);
484 log_error("Could not validate key \"%s\" for value \"%s\" on line: %d in file: \"%s\": %s\n", key, value,
635 free(k->value);
699 * Given a set of key value pairs, this will construct a new rule map.
759 /* Assign rule map value to one from file */
760 r->data = strdup(k->value);
773 * Neverallows are keyed off of all key value pairs,
778 int val_len = strlen(k->value);
793 strncat(new_map->key, k->value, val_len);
1072 char *value = NULL;
1111 value = strchr(name, '=');
1112 if (!value)
1114 *value++ = 0;
1120 keys[token_cnt].value = strdup(value);
1121 if (!keys[token_cnt].value)
1141 log_error("Reading file: \"%s\" line: %zu name: \"%s\" value: \"%s\"\n",
1142 in_file->name, lineno, name, value);