• Home
  • Raw
  • Download

Lines Matching refs:rule

346 				struct smack_parsed_rule *rule, int import,  in smk_fill_rule()  argument
353 rule->smk_subject = smk_import_entry(subject, len); in smk_fill_rule()
354 if (IS_ERR(rule->smk_subject)) in smk_fill_rule()
355 return PTR_ERR(rule->smk_subject); in smk_fill_rule()
357 rule->smk_object = smk_import_entry(object, len); in smk_fill_rule()
358 if (IS_ERR(rule->smk_object)) in smk_fill_rule()
359 return PTR_ERR(rule->smk_object); in smk_fill_rule()
368 rule->smk_subject = skp; in smk_fill_rule()
377 rule->smk_object = skp; in smk_fill_rule()
380 rule->smk_access1 = smk_perm_from_str(access1); in smk_fill_rule()
382 rule->smk_access2 = smk_perm_from_str(access2); in smk_fill_rule()
384 rule->smk_access2 = ~rule->smk_access1; in smk_fill_rule()
397 static int smk_parse_rule(const char *data, struct smack_parsed_rule *rule, in smk_parse_rule() argument
403 data + SMK_LABELLEN + SMK_LABELLEN, NULL, rule, in smk_parse_rule()
417 static ssize_t smk_parse_long_rule(char *data, struct smack_parsed_rule *rule, in smk_parse_long_rule() argument
447 rc = smk_fill_rule(tok[0], tok[1], tok[2], tok[3], rule, import, 0); in smk_parse_long_rule()
478 struct smack_parsed_rule rule; in smk_write_rules_list() local
526 rc = smk_parse_rule(data, &rule, 1); in smk_write_rules_list()
531 rc = smk_parse_long_rule(data + cnt, &rule, 1, tokens); in smk_write_rules_list()
542 rc = smk_set_access(&rule, &rule.smk_subject->smk_rules, in smk_write_rules_list()
543 &rule.smk_subject->smk_rules_lock, 1); in smk_write_rules_list()
545 rc = smk_set_access(&rule, rule_list, rule_lock, 0); in smk_write_rules_list()
870 char *rule; in smk_set_cipso() local
891 rule = data; in smk_set_cipso()
898 skp = smk_import_entry(rule, 0); in smk_set_cipso()
905 rule += SMK_LABELLEN; in smk_set_cipso()
907 rule += strlen(skp->smk_known) + 1; in smk_set_cipso()
909 ret = sscanf(rule, "%d", &maplevel); in smk_set_cipso()
913 rule += SMK_DIGITLEN; in smk_set_cipso()
914 ret = sscanf(rule, "%d", &catlen); in smk_set_cipso()
925 rule += SMK_DIGITLEN; in smk_set_cipso()
926 ret = sscanf(rule, "%u", &cat); in smk_set_cipso()
2289 struct smack_parsed_rule rule; in smk_user_access() local
2300 res = smk_parse_rule(data, &rule, 0); in smk_user_access()
2305 res = smk_parse_long_rule(data, &rule, 0, 3); in smk_user_access()
2309 res = smk_access(rule.smk_subject, rule.smk_object, in smk_user_access()
2310 rule.smk_access1, NULL); in smk_user_access()