public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Simon Derr <simon.derr@bull.net>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Move syscall declarations from linux/key.h [try #2]
Date: Wed, 08 Sep 2004 13:17:25 +0100	[thread overview]
Message-ID: <6761.1094645845@redhat.com> (raw)
In-Reply-To: <20040908014735.7a2058dc.akpm@osdl.org>


The attached patch moves the syscall declarations from linux/key.h into
linux/syscalls.h. Also declare struct user_struct in advance as that might not
have been declared yet at the point of inclusion.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 key.h      |   26 ++++++--------------------
 syscalls.h |   15 +++++++++++++++
 2 files changed, 21 insertions(+), 20 deletions(-)

diff -ur linux-2.6.9-rc1-mm4/include/linux/key.h linux-2.6.9-rc1-mm4-afs/include/linux/key.h
--- linux-2.6.9-rc1-mm4/include/linux/key.h	2004-09-07 10:51:38.000000000 +0100
+++ linux-2.6.9-rc1-mm4-afs/include/linux/key.h	2004-09-08 13:14:00.056568109 +0100
@@ -22,15 +22,17 @@
 #include <asm/atomic.h>
 
 #ifdef __KERNEL__
-#ifdef CONFIG_KEYS
-
-#undef KEY_DEBUGGING
 
 /* key handle serial number */
 typedef int32_t key_serial_t;
 
 /* key handle permissions mask */
 typedef uint32_t key_perm_t;
+
+#ifdef CONFIG_KEYS
+
+#undef KEY_DEBUGGING
+
 #define KEY_USR_VIEW	0x00010000	/* user can view a key's attributes */
 #define KEY_USR_READ	0x00020000	/* user can read key payload / view keyring */
 #define KEY_USR_WRITE	0x00040000	/* user can update key payload / add link to keyring */
@@ -53,6 +55,7 @@
 #define KEY_OTH_ALL	0x0000001f
 
 struct seq_file;
+struct user_struct;
 
 struct key;
 struct key_type;
@@ -251,20 +254,6 @@
 extern void key_fsuid_changed(struct task_struct *tsk);
 extern void key_fsgid_changed(struct task_struct *tsk);
 
-asmlinkage long sys_add_key(const char __user *_type,
-			    const char __user *_description,
-			    const void __user *_payload,
-			    size_t plen,
-			    key_serial_t destringid);
-
-asmlinkage long sys_request_key(const char __user *_type,
-				const char __user *_description,
-				const char __user *_callout_info,
-				key_serial_t destringid);
-
-asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
-			   unsigned long arg4, unsigned long arg5);
-
 #else /* CONFIG_KEYS */
 
 #define key_put(k)			do { } while(0)
@@ -276,9 +265,6 @@
 #define exec_keys(t)			do { } while(0)
 #define key_fsuid_changed(t)		do { } while(0)
 #define key_fsgid_changed(t)		do { } while(0)
-#define sys_addkey(a,b,c,d,e)		(-ENOSYS)
-#define sys_request_key(a,b,c,d,e)	(-ENOSYS)
-#define sys_keyctl(a,b,c,d,e)		(-ENOSYS)
 
 #endif /* CONFIG_KEYS */
 #endif /* __KERNEL__ */
diff -ur linux-2.6.9-rc1-mm4/include/linux/syscalls.h linux-2.6.9-rc1-mm4-afs/include/linux/syscalls.h
--- linux-2.6.9-rc1-mm4/include/linux/syscalls.h	2004-09-07 10:51:39.000000000 +0100
+++ linux-2.6.9-rc1-mm4-afs/include/linux/syscalls.h	2004-09-08 13:13:19.375988125 +0100
@@ -61,6 +61,7 @@
 #include <asm/siginfo.h>
 #include <asm/signal.h>
 #include <linux/quota.h>
+#include <linux/key.h>
 
 asmlinkage long sys_time(int __user *tloc);
 asmlinkage long sys_stime(time_t __user *tptr);
@@ -487,4 +488,18 @@
 asmlinkage long sys_uselib(const char __user *library);
 asmlinkage long sys_ni_syscall(void);
 
+asmlinkage long sys_add_key(const char __user *_type,
+			    const char __user *_description,
+			    const void __user *_payload,
+			    size_t plen,
+			    key_serial_t destringid);
+
+asmlinkage long sys_request_key(const char __user *_type,
+				const char __user *_description,
+				const char __user *_callout_info,
+				key_serial_t destringid);
+
+asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
+			   unsigned long arg4, unsigned long arg5);
+
 #endif

  parent reply	other threads:[~2004-09-08 12:22 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-07  9:08 2.6.9-rc1-mm4 Andrew Morton
2004-09-07 11:59 ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 14:24   ` 2.6.9-rc1-mm4 Kasper Sandberg
2004-09-07 14:32     ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 17:04       ` 2.6.9-rc1-mm4 Francois Romieu
2004-09-07 18:30         ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 12:05 ` 2.6.9-rc1-mm4 Terje Kvernes
2004-09-07 12:21 ` 2.6.9-rc1-mm4 Simon Derr
2004-09-08  8:47   ` 2.6.9-rc1-mm4 Andrew Morton
2004-09-08  8:54     ` 2.6.9-rc1-mm4 Simon Derr
2004-09-08  9:30     ` [PATCH] Remove syscall declarations from linux/key.h David Howells
2004-09-08 11:23       ` Arnd Bergmann
2004-09-08  9:37     ` 2.6.9-rc1-mm4 David Howells
2004-09-08 12:06     ` [PATCH] Move syscall declarations from linux/key.h David Howells
2004-09-08 12:17     ` David Howells [this message]
2004-09-07 14:31 ` 2.6.9-rc1-mm4 Norberto Bensa
2004-09-07 15:45 ` 2.6.9-rc1-mm4 Zwane Mwaikambo
2004-09-07 16:46 ` 2.6.9-rc1-mm4 Danny ter Haar
2004-09-07 22:12   ` Killer CacheFS [was Re: 2.6.9-rc1-mm4] J.A. Magallon
2004-09-07 18:43 ` [patch] 2.6.9-rc1-mm4: small LOCALVERSION help text corrections Adrian Bunk
2004-09-07 21:27   ` Sam Ravnborg
2004-09-07 19:42     ` Adrian Bunk
2004-09-07 23:26   ` Ian Wienand
2004-09-07 19:02 ` [patch] 2.6.9-rc1-mm4: Makefile: remove tabs from empty lines Adrian Bunk
2004-09-07 21:14   ` Sam Ravnborg
2004-09-07 19:40     ` Adrian Bunk
2004-09-08  5:51     ` Dmitry Torokhov
2004-09-08  8:17       ` Sam Ravnborg
2004-09-07 19:26 ` [patch] 2.6.9-rc1-mm4: atyfb_base.c gcc 2.95 compile error Adrian Bunk
2004-09-08  0:38   ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-09-07 20:01 ` 2.6.9-rc1-mm4 Lorenzo Allegrucci
2004-09-07 20:23   ` 2.6.9-rc1-mm4 Nathan Bryant
2004-09-07 21:07     ` 2.6.9-rc1-mm4 Bjorn Helgaas
2004-09-08  8:15     ` 2.6.9-rc1-mm4 Lorenzo Allegrucci
2004-09-07 21:47 ` 2.6.9-rc1-mm4 (compile stats) John Cherry
2004-09-07 21:58   ` John Cherry
2004-09-08 13:00 ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-08 13:10   ` 2.6.9-rc1-mm4 David Howells
2004-09-08 20:16 ` 2.6.9-rc1-mm4 Nathan Lynch
2004-09-09  2:01 ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-09  2:30   ` 2.6.9-rc1-mm4 William Lee Irwin III
2004-09-09 18:04 ` 2.6.9-rc1-mm4 Pasi Savolainen
2004-09-09 19:33   ` 2.6.9-rc1-mm4 Pasi Savolainen

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=6761.1094645845@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon.derr@bull.net \
    /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