Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 5 of 5) sorted by relevance

/security/integrity/ima/
Dima_policy.c44 void *rule; /* LSM file metadata specific */ member
99 static bool ima_match_rules(struct ima_measure_rule_entry *rule, in ima_match_rules() argument
106 if ((rule->flags & IMA_FUNC) && rule->func != func) in ima_match_rules()
108 if ((rule->flags & IMA_MASK) && rule->mask != mask) in ima_match_rules()
110 if ((rule->flags & IMA_FSMAGIC) in ima_match_rules()
111 && rule->fsmagic != inode->i_sb->s_magic) in ima_match_rules()
113 if ((rule->flags & IMA_UID) && rule->uid != cred->uid) in ima_match_rules()
119 if (!rule->lsm[i].rule) in ima_match_rules()
128 rule->lsm[i].type, in ima_match_rules()
130 rule->lsm[i].rule, in ima_match_rules()
[all …]
/security/smack/
Dsmackfs.c196 static int smk_parse_rule(const char *data, struct smack_rule *rule, int import) in smk_parse_rule() argument
202 rule->smk_subject = smk_import(data, 0); in smk_parse_rule()
203 if (rule->smk_subject == NULL) in smk_parse_rule()
206 rule->smk_object = smk_import(data + SMK_LABELLEN, 0); in smk_parse_rule()
207 if (rule->smk_object == NULL) in smk_parse_rule()
214 rule->smk_subject = skp->smk_known; in smk_parse_rule()
220 rule->smk_object = skp->smk_known; in smk_parse_rule()
223 rule->smk_access = 0; in smk_parse_rule()
230 rule->smk_access |= MAY_READ; in smk_parse_rule()
241 rule->smk_access |= MAY_WRITE; in smk_parse_rule()
[all …]
Dsmack_lsm.c3348 char **rule = (char **)vrule; in smack_audit_rule_init() local
3349 *rule = NULL; in smack_audit_rule_init()
3357 *rule = smk_import(rulestr, 0); in smack_audit_rule_init()
3400 char *rule = vrule; in smack_audit_rule_match() local
3402 if (!rule) { in smack_audit_rule_match()
3419 return (rule == smack); in smack_audit_rule_match()
3421 return (rule != smack); in smack_audit_rule_match()
/security/selinux/include/
Daudit.h32 int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **rule);
41 void selinux_audit_rule_free(void *rule);
54 int selinux_audit_rule_match(u32 sid, u32 field, u32 op, void *rule,
/security/selinux/ss/
Dservices.c2980 struct selinux_audit_rule *rule = vrule; in selinux_audit_rule_free() local
2982 if (rule) { in selinux_audit_rule_free()
2983 context_destroy(&rule->au_ctxt); in selinux_audit_rule_free()
2984 kfree(rule); in selinux_audit_rule_free()
2994 struct selinux_audit_rule **rule = (struct selinux_audit_rule **)vrule; in selinux_audit_rule_init() local
2997 *rule = NULL; in selinux_audit_rule_init()
3079 *rule = tmprule; in selinux_audit_rule_init()
3085 int selinux_audit_rule_known(struct audit_krule *rule) in selinux_audit_rule_known() argument
3089 for (i = 0; i < rule->field_count; i++) { in selinux_audit_rule_known()
3090 struct audit_field *f = &rule->fields[i]; in selinux_audit_rule_known()
[all …]