mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
userns: Convert EVM to deal with kuids and kgids in it's hmac computation
Cc: Mimi Zohar <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
This commit is contained in:
parent
29f82ae56e
commit
cf9c93526f
2 changed files with 2 additions and 3 deletions
|
|
@ -106,8 +106,8 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
|
|||
memset(&hmac_misc, 0, sizeof hmac_misc);
|
||||
hmac_misc.ino = inode->i_ino;
|
||||
hmac_misc.generation = inode->i_generation;
|
||||
hmac_misc.uid = inode->i_uid;
|
||||
hmac_misc.gid = inode->i_gid;
|
||||
hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid);
|
||||
hmac_misc.gid = from_kgid(&init_user_ns, inode->i_gid);
|
||||
hmac_misc.mode = inode->i_mode;
|
||||
crypto_shash_update(desc, (const u8 *)&hmac_misc, sizeof hmac_misc);
|
||||
crypto_shash_final(desc, digest);
|
||||
|
|
|
|||
Loading…
Reference in a new issue