Commit f1f4662e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent dfe31dda
......@@ -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
......
......@@ -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"
......
......@@ -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"
......
#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_ */
......@@ -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),
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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) \
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment