mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
fs: switch ->s_uuid to uuid_t
For some file systems we still memcpy into it, but in various places this already allows us to use the proper uuid helpers. More to come.. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> Acked-by: Mimi Zohar <[email protected]> (Changes to IMA/EVM) Reviewed-by: Andy Shevchenko <[email protected]>
This commit is contained in:
parent
787d8c530a
commit
85787090a2
14 changed files with 23 additions and 36 deletions
|
|
@ -164,7 +164,7 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
|
|||
hmac_misc.mode = inode->i_mode;
|
||||
crypto_shash_update(desc, (const u8 *)&hmac_misc, sizeof(hmac_misc));
|
||||
if (evm_hmac_attrs & EVM_ATTR_FSUUID)
|
||||
crypto_shash_update(desc, inode->i_sb->s_uuid,
|
||||
crypto_shash_update(desc, &inode->i_sb->s_uuid.b[0],
|
||||
sizeof(inode->i_sb->s_uuid));
|
||||
crypto_shash_final(desc, digest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ static bool ima_match_rules(struct ima_rule_entry *rule, struct inode *inode,
|
|||
&& rule->fsmagic != inode->i_sb->s_magic)
|
||||
return false;
|
||||
if ((rule->flags & IMA_FSUUID) &&
|
||||
memcmp(&rule->fsuuid, inode->i_sb->s_uuid, sizeof(rule->fsuuid)))
|
||||
!uuid_equal(&rule->fsuuid, &inode->i_sb->s_uuid))
|
||||
return false;
|
||||
if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue