diff options
author | John Johansen <john.johansen@canonical.com> | 2017-09-06 16:33:56 -0700 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2018-02-09 11:30:01 -0800 |
commit | 95652cac83605d96cf3849e80e3e3f4dce74f5da (patch) | |
tree | 7359f5c6003ac7e7af47eeceed173bc10fb3a4a1 /security/apparmor/include | |
parent | 6e0654d20ed9679cbf75a0ff7cd786e364f7f09a (diff) | |
download | linux-95652cac83605d96cf3849e80e3e3f4dce74f5da.tar.gz linux-95652cac83605d96cf3849e80e3e3f4dce74f5da.tar.bz2 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.h | 3 |
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); |