]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix SELinux build for "make O=..."
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:42:46 +0000 (23:42 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:42:46 +0000 (23:42 -0800)
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.

security/selinux/ss/Makefile
security/selinux/ss/avtab.c
security/selinux/ss/ebitmap.c
security/selinux/ss/global.h [deleted file]
security/selinux/ss/hashtab.c
security/selinux/ss/mls.c
security/selinux/ss/policydb.c
security/selinux/ss/services.c
security/selinux/ss/sidtab.c
security/selinux/ss/symtab.c

index ac6398ee2b4234be8709e02b7c5337710b1a7f82..fa138960bd50114471073cfa550ba518b0fbbb26 100644 (file)
@@ -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
index df67d3a2b1d1b8e7a37247d5d3222481d4f83d84..a1eab290d5a6d7d3e7e55860bdb5bd4f7f60dc78 100644 (file)
@@ -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"
 
index 7ea4300c63dd991af3409073f5cbec6c2fafd1e3..98be57f3391f63342a2bee78442d3e9cd351fba3 100644 (file)
@@ -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 (file)
index dfb799f..0000000
+++ /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_ */
index 1ecc0579ca8d1556435c10a15696f2c65c2958b7..2a6752a8d016b9347c8326699c1bdf94a8f310d0 100644 (file)
@@ -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),
index 26fa6691b076234e203a64f521a4c7e00382ed58..aa1b54c4708b29a426f90cd798e67d1a67cc2006 100644 (file)
@@ -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"
index 9bbd7b50655d2f56925a527844191c91386aa080..153a5b26247a31a329cb004c850319974cab40d7 100644 (file)
@@ -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"
 
index 984c75bbf127e478a0debebed5aae8e8f7706c96..57f060249ae9b5fdc780347266b81037719e9efe 100644 (file)
  *     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"
index b13314a0de46e8e16f82dbc9f389b6a58f16e955..b9f944cb86e9b1691e7f56d595f8b5b4a9ec906e 100644 (file)
@@ -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) \
index 58f47953eb9b3e64f7f8846c121b334ba3d4ce60..24a10d36d3b664a939f2febfed902c072310e497 100644 (file)
@@ -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)