mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
safesetid: move initcalls to the LSM framework
Reviewed-by: Kees Cook <kees@kernel.org> Acked-by: Micah Morton <mortonm@chromium.org> Reviewed-by: John Johansen <john.johhansen@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
@@ -289,4 +289,5 @@ static int __init safesetid_security_init(void)
|
||||
DEFINE_LSM(safesetid_security_init) = {
|
||||
.id = &safesetid_lsmid,
|
||||
.init = safesetid_security_init,
|
||||
.initcall_fs = safesetid_init_securityfs,
|
||||
};
|
||||
|
||||
@@ -70,4 +70,6 @@ enum sid_policy_type _setid_policy_lookup(struct setid_ruleset *policy,
|
||||
extern struct setid_ruleset __rcu *safesetid_setuid_rules;
|
||||
extern struct setid_ruleset __rcu *safesetid_setgid_rules;
|
||||
|
||||
int safesetid_init_securityfs(void);
|
||||
|
||||
#endif /* _SAFESETID_H */
|
||||
|
||||
@@ -308,7 +308,7 @@ static const struct file_operations safesetid_gid_file_fops = {
|
||||
.write = safesetid_gid_file_write,
|
||||
};
|
||||
|
||||
static int __init safesetid_init_securityfs(void)
|
||||
int __init safesetid_init_securityfs(void)
|
||||
{
|
||||
int ret;
|
||||
struct dentry *policy_dir;
|
||||
@@ -345,4 +345,3 @@ error:
|
||||
securityfs_remove(policy_dir);
|
||||
return ret;
|
||||
}
|
||||
fs_initcall(safesetid_init_securityfs);
|
||||
|
||||
Reference in New Issue
Block a user