diff options
author | Eric Paris <eparis@redhat.com> | 2010-04-20 10:20:54 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-04-21 09:58:13 +1000 |
commit | 6ccd045630054c99ba1bb35673db12cfcf1eea58 (patch) | |
tree | bce41e39722ae178807abe2213fd94e582842bae /security/integrity/ima/ima.h | |
parent | a200005038955057063fc8ea82129ebc785df41c (diff) | |
download | blackbird-op-linux-6ccd045630054c99ba1bb35673db12cfcf1eea58.tar.gz blackbird-op-linux-6ccd045630054c99ba1bb35673db12cfcf1eea58.zip |
ima: handle multiple rules per write
Currently IMA will only accept one rule per write(). This patch allows IMA to
accept writes which contain multiple rules but only processes one rule per
write. \n is used as the delimiter between rules. IMA will return a short
write indicating that it only accepted up to the first \n.
This allows simple userspace utilities like cat to be used to load an IMA
policy instead of needing a special userspace utility that understood 'one
write per rule'
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r-- | security/integrity/ima/ima.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h index 47fb65d1fcbd..16d100d3fc38 100644 --- a/security/integrity/ima/ima.h +++ b/security/integrity/ima/ima.h @@ -135,7 +135,7 @@ enum ima_hooks { FILE_CHECK = 1, FILE_MMAP, BPRM_CHECK }; int ima_match_policy(struct inode *inode, enum ima_hooks func, int mask); void ima_init_policy(void); void ima_update_policy(void); -int ima_parse_add_rule(char *); +ssize_t ima_parse_add_rule(char *); void ima_delete_rules(void); /* LSM based policy rules require audit */ |