+int ima_fs_ns_init(struct user_namespace *user_ns, struct dentry *root)That should probably be return PTR_ERR(int_dir)
{
struct ima_namespace *ns = user_ns->ima_ns;
- struct dentry *ima_dir;
+ struct dentry *int_dir;
+ struct dentry *ima_dir = NULL;
struct dentry *ima_symlink = NULL;
struct dentry *binary_runtime_measurements = NULL;
struct dentry *ascii_runtime_measurements = NULL;
struct dentry *runtime_measurements_count = NULL;
struct dentry *violations = NULL;
- ima_dir = securityfs_create_dir("ima", integrity_dir);
+ /* FIXME: update when evm and integrity are namespaced */
+ if (user_ns != &init_user_ns) {
+ int_dir =
+ securityfs_create_dir("integrity", root);
+ if (IS_ERR(int_dir))
+ return -1;