mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] don't include <linux/sysctl.h> in <linux/security.h>
Date: Sun, 19 Sep 2004 12:17:12 +0200	[thread overview]
Message-ID: <20040919101712.GA5949@lst.de> (raw)

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"


                 reply	other threads:[~2004-09-19 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040919101712.GA5949@lst.de \
    --to=hch@lst.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome