diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2022-01-25 23:46:23 +0100 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2022-02-02 17:59:09 +0100 |
commit | f7333b9572d0559e00352a926c92f29f061b4569 (patch) | |
tree | f4bf80865e7b2f37ea2ce571636069c862a22d09 /security/integrity | |
parent | integrity: check the return value of audit_log_start() (diff) | |
download | linux-f7333b9572d0559e00352a926c92f29f061b4569.tar.xz linux-f7333b9572d0559e00352a926c92f29f061b4569.zip |
ima: Remove ima_policy file before directory
The removal of ima_dir currently fails since ima_policy still exists, so
remove the ima_policy file before removing the directory.
Fixes: 4af4662fa4a9 ("integrity: IMA policy")
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity')
-rw-r--r-- | security/integrity/ima/ima_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index 3d8e9d5db5aa..3ad8f7734208 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c @@ -496,12 +496,12 @@ int __init ima_fs_init(void) return 0; out: + securityfs_remove(ima_policy); securityfs_remove(violations); securityfs_remove(runtime_measurements_count); securityfs_remove(ascii_runtime_measurements); securityfs_remove(binary_runtime_measurements); securityfs_remove(ima_symlink); securityfs_remove(ima_dir); - securityfs_remove(ima_policy); return -1; } |