mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
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: 4af4662fa4
("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>
This commit is contained in:
parent
83230351c5
commit
f7333b9572
@ -496,12 +496,12 @@ int __init ima_fs_init(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out:
|
out:
|
||||||
|
securityfs_remove(ima_policy);
|
||||||
securityfs_remove(violations);
|
securityfs_remove(violations);
|
||||||
securityfs_remove(runtime_measurements_count);
|
securityfs_remove(runtime_measurements_count);
|
||||||
securityfs_remove(ascii_runtime_measurements);
|
securityfs_remove(ascii_runtime_measurements);
|
||||||
securityfs_remove(binary_runtime_measurements);
|
securityfs_remove(binary_runtime_measurements);
|
||||||
securityfs_remove(ima_symlink);
|
securityfs_remove(ima_symlink);
|
||||||
securityfs_remove(ima_dir);
|
securityfs_remove(ima_dir);
|
||||||
securityfs_remove(ima_policy);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user