Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262138AbUIHMWN (ORCPT ); Wed, 8 Sep 2004 08:22:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262062AbUIHMTr (ORCPT ); Wed, 8 Sep 2004 08:19:47 -0400 Received: from mx1.redhat.com ([66.187.233.31]:21485 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261711AbUIHMSI (ORCPT ); Wed, 8 Sep 2004 08:18:08 -0400 From: David Howells In-Reply-To: <20040908014735.7a2058dc.akpm@osdl.org> To: Andrew Morton Cc: Simon Derr , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] Move syscall declarations from linux/key.h [try #2] User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Wed, 08 Sep 2004 13:17:25 +0100 Message-ID: <6761.1094645845@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3680 Lines: 110 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 --- 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 #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 #include #include +#include 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 - 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/