ubifs: Set s_uuid in super block to support ima/evm uuid options
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>
Tue, 16 Feb 2021 07:23:34 +0000 (08:23 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 15 Apr 2021 20:00:32 +0000 (22:00 +0200)
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@pengutronix.de>
Co-developed-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/super.c

index ddb2ca6..73f0ac2 100644 (file)
@@ -2232,6 +2232,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;