[PATCH] Move syscall declarations from linux/key.h

David Howells
2004-09-08T12:13:56Z

The attached patch moves the syscall declarations from linux/key.h into
linux/syscalls.h.

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

key.h | 25 +++++--------------------
syscalls.h | 15 +++++++++++++++
2 files changed, 20 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:02:08.474425143 +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 */
@@ -251,20 +253,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 +264,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:01:26.501958863 +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