Skip to content

Commit

Permalink
LSM: Add __init to fixup function.
Browse files Browse the repository at this point in the history
register_security() became __init function.
So do verify() and security_fixup_ops().

Signed-off-by: Tetsuo Handa <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Tetsuo Handa authored and James Morris committed May 16, 2010
1 parent 7762fbf commit c80901f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion security/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static void cap_audit_rule_free(void *lsmrule)
} \
} while (0)

void security_fixup_ops(struct security_operations *ops)
void __init security_fixup_ops(struct security_operations *ops)
{
set_to_cap_if_null(ops, ptrace_access_check);
set_to_cap_if_null(ops, ptrace_traceme);
Expand Down
4 changes: 2 additions & 2 deletions security/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
CONFIG_DEFAULT_SECURITY;

/* things that live in capability.c */
extern void security_fixup_ops(struct security_operations *ops);
extern void __init security_fixup_ops(struct security_operations *ops);

static struct security_operations *security_ops;
static struct security_operations default_security_ops = {
.name = "default",
};

static inline int verify(struct security_operations *ops)
static inline int __init verify(struct security_operations *ops)
{
/* verify the security_operations structure exists */
if (!ops)
Expand Down

0 comments on commit c80901f

Please sign in to comment.