ima: set appraise status in fix mode only when xattr is fixed
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>
Thu, 20 Sep 2012 19:38:53 +0000 (22:38 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 16 Jan 2013 20:47:07 +0000 (15:47 -0500)
commitdef3e8b9ee23cb69036910e48ec4e3eff40e04cb
tree0840ab9e618f15f4c3c5e8ee6fafe5a17c814af2
parente90805656d4683f84d360276102ae63adc777a38
ima: set appraise status in fix mode only when xattr is fixed

When a file system is mounted read-only, setting the xattr value in
fix mode fails with an error code -EROFS.  The xattr should be fixed
after the file system is remounted read-write.  This patch verifies
that the set xattr succeeds, before setting the appraise status value
to INTEGRITY_PASS.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_appraise.c