summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-12-29 23:42:46 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2003-12-29 23:42:46 -0800
commitf1f4662e222e469de9b5bbd77fbaa025236a5746 (patch)
treefa6d4128a63785f4bafdc91df4f3d2f1b68bb1fd
parentdfe31ddae13b9344045bc6a31f0d13cb4308b8f2 (diff)
[PATCH] Fix SELinux build for "make O=..."
From: Stephen Smalley <sds@epoch.ncsc.mil> This patch fixes the SELinux build for "make O=..." by removing the use of -include and eliminating the global.h file, adding appropriate individual #include's to the various files in the security/selinux/ss subdirectory. The compilation error was reported by Sam Ravnborg and again by Adrian Bunk.
-rw-r--r--security/selinux/ss/Makefile3
-rw-r--r--security/selinux/ss/avtab.c4
-rw-r--r--security/selinux/ss/ebitmap.c3
-rw-r--r--security/selinux/ss/global.h18
-rw-r--r--security/selinux/ss/hashtab.c3
-rw-r--r--security/selinux/ss/mls.c4
-rw-r--r--security/selinux/ss/policydb.c5
-rw-r--r--security/selinux/ss/services.c11
-rw-r--r--security/selinux/ss/sidtab.c6
-rw-r--r--security/selinux/ss/symtab.c4
10 files changed, 41 insertions, 20 deletions
diff --git a/security/selinux/ss/Makefile b/security/selinux/ss/Makefile
index ac6398ee2b42..fa138960bd50 100644
--- a/security/selinux/ss/Makefile
+++ b/security/selinux/ss/Makefile
@@ -2,8 +2,7 @@
# Makefile for building the SELinux security server as part of the kernel tree.
#
-EXTRA_CFLAGS += -Isecurity/selinux/include -include security/selinux/ss/global.h
-
+EXTRA_CFLAGS += -Isecurity/selinux/include
obj-y := ss.o
ss-objs := ebitmap.o hashtab.o symtab.o sidtab.o avtab.o policydb.o services.o
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index df67d3a2b1d1..a1eab290d5a6 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -3,6 +3,10 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/errno.h>
#include "avtab.h"
#include "policydb.h"
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index 7ea4300c63dd..98be57f3391f 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -3,6 +3,9 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
#include "ebitmap.h"
#include "policydb.h"
diff --git a/security/selinux/ss/global.h b/security/selinux/ss/global.h
deleted file mode 100644
index dfb799faf32f..000000000000
--- a/security/selinux/ss/global.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _SS_GLOBAL_H_
-#define _SS_GLOBAL_H_
-
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/ctype.h>
-#include <linux/in.h>
-#include <linux/spinlock.h>
-#include <linux/sched.h>
-#include <linux/vmalloc.h>
-
-#include "flask.h"
-#include "avc.h"
-#include "avc_ss.h"
-#include "security.h"
-
-#endif /* _SS_GLOBAL_H_ */
diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c
index 1ecc0579ca8d..2a6752a8d016 100644
--- a/security/selinux/ss/hashtab.c
+++ b/security/selinux/ss/hashtab.c
@@ -3,6 +3,9 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
#include "hashtab.h"
struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, void *key),
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index 26fa6691b076..aa1b54c4708b 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -3,6 +3,10 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
#include "mls.h"
#include "policydb.h"
#include "services.h"
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 9bbd7b50655d..153a5b26247a 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -3,6 +3,11 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include "security.h"
#include "policydb.h"
#include "mls.h"
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 984c75bbf127..57f060249ae9 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -10,6 +10,17 @@
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/in.h>
+#include <asm/semaphore.h>
+#include "flask.h"
+#include "avc.h"
+#include "avc_ss.h"
+#include "security.h"
#include "context.h"
#include "policydb.h"
#include "sidtab.h"
diff --git a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c
index b13314a0de46..b9f944cb86e9 100644
--- a/security/selinux/ss/sidtab.c
+++ b/security/selinux/ss/sidtab.c
@@ -3,6 +3,12 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include "flask.h"
+#include "security.h"
#include "sidtab.h"
#define SIDTAB_HASH(sid) \
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c
index 58f47953eb9b..24a10d36d3b6 100644
--- a/security/selinux/ss/symtab.c
+++ b/security/selinux/ss/symtab.c
@@ -3,6 +3,10 @@
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
#include "symtab.h"
static unsigned int symhash(struct hashtab *h, void *key)