summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRafal Krypa <r.krypa@samsung.com>2012-11-27 16:28:11 +0100
committerCasey Schaufler <casey@schaufler-ca.com>2013-03-19 14:15:21 -0700
commitd15d9fad16f6aa459cf4926a1d3aba36b004e9a2 (patch)
tree69d8cb3fa6f0fd12b34d1722a4113740e3bbf9f8 /security
parent921f3ac4c3f2fd46ae99195a1168383ca9b41ed1 (diff)
downloadlinux-3.10-d15d9fad16f6aa459cf4926a1d3aba36b004e9a2.tar.gz
linux-3.10-d15d9fad16f6aa459cf4926a1d3aba36b004e9a2.tar.bz2
linux-3.10-d15d9fad16f6aa459cf4926a1d3aba36b004e9a2.zip
Smack: prevent revoke-subject from failing when unseen label is written to it
Special file /smack/revoke-subject will silently accept labels that are not present on the subject label list. Nothing has to be done for such labels, as there are no rules for them to revoke. Targeted for git://git.gitorious.org/smack-next/kernel.git Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Diffstat (limited to 'security')
-rw-r--r--security/smack/smackfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 76a5dca4640..337e32c551d 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -2035,10 +2035,8 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
}
skp = smk_find_entry(cp);
- if (skp == NULL) {
- rc = -EINVAL;
+ if (skp == NULL)
goto free_out;
- }
rule_list = &skp->smk_rules;
rule_lock = &skp->smk_rules_lock;