lkml.org 
[lkml]   [2004]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Move syscall declarations from linux/key.h [try #2]
Date

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
-
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.088 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site