ima: handle multiple rules per write
authorEric Paris <eparis@redhat.com>
Tue, 20 Apr 2010 14:20:54 +0000 (10:20 -0400)
committerJames Morris <jmorris@namei.org>
Tue, 20 Apr 2010 23:58:13 +0000 (09:58 +1000)
commit6ccd045630054c99ba1bb35673db12cfcf1eea58
treebce41e39722ae178807abe2213fd94e582842bae
parenta200005038955057063fc8ea82129ebc785df41c
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>
security/integrity/ima/ima.h
security/integrity/ima/ima_fs.c
security/integrity/ima/ima_policy.c