Skip to content

Commit 9484ae1

Browse files
committed
tomoyo: move initcalls to the LSM framework
Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: John Johansen <john.johhansen@canonical.com> Acked-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 06643d5 commit 9484ae1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

security/tomoyo/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ struct tomoyo_task {
924924

925925
/********** Function prototypes. **********/
926926

927+
int tomoyo_interface_init(void);
928+
927929
bool tomoyo_address_matches_group(const bool is_ipv6, const __be32 *address,
928930
const struct tomoyo_group *group);
929931
bool tomoyo_compare_number_union(const unsigned long value,

security/tomoyo/securityfs_if.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static void __init tomoyo_create_entry(const char *name, const umode_t mode,
233233
*
234234
* Returns 0.
235235
*/
236-
static int __init tomoyo_interface_init(void)
236+
int __init tomoyo_interface_init(void)
237237
{
238238
struct tomoyo_domain_info *domain;
239239
struct dentry *tomoyo_dir;
@@ -269,5 +269,3 @@ static int __init tomoyo_interface_init(void)
269269
tomoyo_load_builtin_policy();
270270
return 0;
271271
}
272-
273-
fs_initcall(tomoyo_interface_init);

security/tomoyo/tomoyo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,4 +617,5 @@ DEFINE_LSM(tomoyo) = {
617617
.flags = LSM_FLAG_LEGACY_MAJOR,
618618
.blobs = &tomoyo_blob_sizes,
619619
.init = tomoyo_init,
620+
.initcall_fs = tomoyo_interface_init,
620621
};

0 commit comments

Comments
 (0)