summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorJohn Johansen2017-09-07 01:33:56 +0200
committerJohn Johansen2018-02-09 20:30:01 +0100
commit95652cac83605d96cf3849e80e3e3f4dce74f5da (patch)
tree7359f5c6003ac7e7af47eeceed173bc10fb3a4a1 /security/apparmor/include
parentapparmor: use the dfa to do label parse string splitting (diff)
downloadkernel-qcow2-linux-95652cac83605d96cf3849e80e3e3f4dce74f5da.tar.gz
kernel-qcow2-linux-95652cac83605d96cf3849e80e3e3f4dce74f5da.tar.xz
kernel-qcow2-linux-95652cac83605d96cf3849e80e3e3f4dce74f5da.zip
apparmor: provide a bounded version of label_parse
some label/context sources might not be guaranteed to be null terminiated provide a size bounded version of label parse to deal with these. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r--security/apparmor/include/label.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/apparmor/include/label.h b/security/apparmor/include/label.h
index 80e9ba9d172c..d871e7ff0952 100644
--- a/security/apparmor/include/label.h
+++ b/security/apparmor/include/label.h
@@ -327,6 +327,9 @@ void aa_label_audit(struct audit_buffer *ab, struct aa_label *label, gfp_t gfp);
void aa_label_seq_print(struct seq_file *f, struct aa_label *label, gfp_t gfp);
void aa_label_printk(struct aa_label *label, gfp_t gfp);
+struct aa_label *aa_label_strn_parse(struct aa_label *base, const char *str,
+ size_t n, gfp_t gfp, bool create,
+ bool force_stack);
struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
gfp_t gfp, bool create, bool force_stack);