diff options
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 6a083303501d..3f7682a387b7 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -3640,6 +3640,16 @@ static void smack_audit_rule_free(void *vrule) | |||
3640 | #endif /* CONFIG_AUDIT */ | 3640 | #endif /* CONFIG_AUDIT */ |
3641 | 3641 | ||
3642 | /** | 3642 | /** |
3643 | * smack_ismaclabel - check if xattr @name references a smack MAC label | ||
3644 | * @name: Full xattr name to check. | ||
3645 | */ | ||
3646 | static int smack_ismaclabel(const char *name) | ||
3647 | { | ||
3648 | return (strcmp(name, XATTR_SMACK_SUFFIX) == 0); | ||
3649 | } | ||
3650 | |||
3651 | |||
3652 | /** | ||
3643 | * smack_secid_to_secctx - return the smack label for a secid | 3653 | * smack_secid_to_secctx - return the smack label for a secid |
3644 | * @secid: incoming integer | 3654 | * @secid: incoming integer |
3645 | * @secdata: destination | 3655 | * @secdata: destination |
@@ -3836,6 +3846,7 @@ struct security_operations smack_ops = { | |||
3836 | .audit_rule_free = smack_audit_rule_free, | 3846 | .audit_rule_free = smack_audit_rule_free, |
3837 | #endif /* CONFIG_AUDIT */ | 3847 | #endif /* CONFIG_AUDIT */ |
3838 | 3848 | ||
3849 | .ismaclabel = smack_ismaclabel, | ||
3839 | .secid_to_secctx = smack_secid_to_secctx, | 3850 | .secid_to_secctx = smack_secid_to_secctx, |
3840 | .secctx_to_secid = smack_secctx_to_secid, | 3851 | .secctx_to_secid = smack_secctx_to_secid, |
3841 | .release_secctx = smack_release_secctx, | 3852 | .release_secctx = smack_release_secctx, |