[PATCH v2] fs: ubifs: set s_uuid in super block to support ima/evm uuid options
From: Juergen Borleis
Date: Tue Feb 16 2021 - 02:25:10 EST
From: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
This is required to provide uuid based integrity functionality for:
ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option).
Co-developed-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Co-developed-by: Juergen Borleis <jbe@xxxxxxxxxxxxxx>
Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
---
fs/ubifs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 138b9426c6c1..a8383ca39a47 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2230,6 +2230,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
goto out_umount;
}
+ import_uuid(&sb->s_uuid, c->uuid);
+
mutex_unlock(&c->umount_mutex);
return 0;
--
2.20.1