Skip to content

Commit 3d25252

Browse files
cschauflerkees
authored andcommitted
SELinux: Remove unused selinux_is_enabled
There are no longer users of selinux_is_enabled(). Remove it. As selinux_is_enabled() is the only reason for include/linux/selinux.h remove that as well. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kees Cook <keescook@chromium.org>
1 parent 98c8865 commit 3d25252

7 files changed

Lines changed: 1 addition & 65 deletions

File tree

‎include/linux/cred.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/capability.h>
1616
#include <linux/init.h>
1717
#include <linux/key.h>
18-
#include <linux/selinux.h>
1918
#include <linux/atomic.h>
2019
#include <linux/uidgid.h>
2120
#include <linux/sched.h>

‎include/linux/selinux.h‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎security/selinux/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
obj-$(CONFIG_SECURITY_SELINUX) := selinux.o
77

88
selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \
9-
netnode.o netport.o ibpkey.o exports.o \
9+
netnode.o netport.o ibpkey.o \
1010
ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \
1111
ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o
1212

‎security/selinux/exports.c‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎security/selinux/hooks.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
#include <linux/personality.h>
8080
#include <linux/audit.h>
8181
#include <linux/string.h>
82-
#include <linux/selinux.h>
8382
#include <linux/mutex.h>
8483
#include <linux/posix-timers.h>
8584
#include <linux/syslog.h>

‎security/selinux/include/audit.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/*
22
* SELinux support for the Audit LSM hooks
33
*
4-
* Most of below header was moved from include/linux/selinux.h which
5-
* is released under below copyrights:
6-
*
74
* Author: James Morris <jmorris@redhat.com>
85
*
96
* Copyright (C) 2005 Red Hat, Inc., James Morris <jmorris@redhat.com>

‎security/selinux/ss/services.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
#include <linux/sched.h>
5050
#include <linux/audit.h>
5151
#include <linux/mutex.h>
52-
#include <linux/selinux.h>
5352
#include <linux/flex_array.h>
5453
#include <linux/vmalloc.h>
5554
#include <net/netlabel.h>

0 commit comments

Comments
 (0)