All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't include <linux/sysctl.h> in <linux/security.h>
@ 2004-09-19 10:17 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-09-19 10:17 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

security.h gets pulled in in lots of places, so use forward
declarations for struct ctl_table instead of pulling sysctl in
everywhere.


--- 1.38/include/linux/security.h	2004-06-18 20:43:31 +02:00
+++ edited/include/linux/security.h	2004-09-19 11:54:22 +02:00
@@ -27,13 +27,14 @@
 #include <linux/signal.h>
 #include <linux/resource.h>
 #include <linux/sem.h>
-#include <linux/sysctl.h>
 #include <linux/shm.h>
 #include <linux/msg.h>
 #include <linux/sched.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
 
+struct ctl_table;
+
 /*
  * These functions are in security/capability.c and are used
  * as the default capabilities functions
@@ -1029,7 +1030,7 @@
			    kernel_cap_t * inheritable,
			    kernel_cap_t * permitted);
	int (*acct) (struct file * file);
-	int (*sysctl) (ctl_table * table, int op);
+	int (*sysctl) (struct ctl_table * table, int op);
	int (*capable) (struct task_struct * tsk, int cap);
	int (*quotactl) (int cmds, int type, int id, struct super_block * sb);
	int (*quota_on) (struct file * f);
@@ -1268,7 +1269,7 @@
	return security_ops->acct (file);
 }
 
-static inline int security_sysctl(ctl_table * table, int op)
+static inline int security_sysctl(struct ctl_table *table, int op)
 {
	return security_ops->sysctl(table, op);
 }
@@ -1940,7 +1941,7 @@
	return 0;
 }
 
-static inline int security_sysctl(ctl_table * table, int op)
+static inline int security_sysctl(struct ctl_table *table, int op)
 {
	return 0;
 }
===== security/selinux/hooks.c 1.60 vs edited =====
--- 1.60/security/selinux/hooks.c	2004-08-24 21:43:46 +02:00
+++ edited/security/selinux/hooks.c	2004-09-19 11:55:21 +02:00
@@ -64,6 +64,7 @@
 #include <net/ipv6.h>
 #include <linux/hugetlb.h>
 #include <linux/personality.h>
+#include <linux/sysctl.h>
 
 #include "avc.h"
 #include "objsec.h"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-19 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-19 10:17 [PATCH] don't include <linux/sysctl.h> in <linux/security.h> Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.