Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions kernel/selinux/selinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void setup_selinux(const char *domain)
}
}

void setup_ksu_cred()
void setup_ksu_cred(void)
{
if (ksu_cred && transive_to_domain(KERNEL_SU_CONTEXT, ksu_cred)) {
pr_err("setup ksu cred failed.\n");
Expand All @@ -73,7 +73,7 @@ void setenforce(bool enforce)
#endif
}

bool getenforce()
bool getenforce(void)
{
#ifdef CONFIG_SECURITY_SELINUX_DISABLE
if (selinux_state.disabled) {
Expand All @@ -100,7 +100,7 @@ static int __security_secid_to_secctx(u32 secid, struct lsm_context *cp)
}
static void __security_release_secctx(struct lsm_context *cp)
{
return security_release_secctx(cp->context, cp->len);
security_release_secctx(cp->context, cp->len);
}
#else
#define __security_secid_to_secctx security_secid_to_secctx
Expand Down Expand Up @@ -180,8 +180,7 @@ static bool is_sid_match(const struct cred *cred, u32 cached_sid,
// Slow path fallback: string comparison (only before cache is initialized)
struct lsm_context ctx;
bool result;
int err = __security_secid_to_secctx(tsec->sid, &ctx);
if (err) {
if (__security_secid_to_secctx(tsec->sid, &ctx)) {
return false;
}
result = strncmp(fallback_context, ctx.context, ctx.len) == 0;
Expand All @@ -194,7 +193,7 @@ bool is_task_ksu_domain(const struct cred *cred)
return is_sid_match(cred, cached_su_sid, KERNEL_SU_CONTEXT);
}

bool is_ksu_domain()
bool is_ksu_domain(void)
{
return is_task_ksu_domain(current_cred());
}
Expand Down