'LSM:How to use the void pointer security with the help of extended attributes?
I am building a LSM and I am using extended attributes for setting the rules (vfs_setxattr). Now I have to block/permit the accesses and I know that I should use the pointer "security", which is in cred and in inode ("i_security"). I would like to initialise those creds properly if a given process has an extended attributes. The hooks for handling the creds are 'cred_alloc_blank', 'cred_free' and 'cred_prepare' (correct me if I am wrong). The problem is that I don't know how I can get the extended attributes with 'vfs_getxattr' if I don't have any path/inode/dentry.
In which hook should I get the extended attributes to set the creds and how? I am using the 5.16 kernel version.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
