lkml.org 
[lkml]   [2004]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] don't include <linux/sysctl.h> in <linux/security.h>
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"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.020 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site