Skip to contentSkip to conversation

unshare system call patch - needed to test pam_namespace

PATCH New Janak Desai 1 participant 1 message Jul 15, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 unshare system call patch - needed to test pam_namespace

Here is part of the unshare system call patch. This one implements system call for i386 arch. I do have suggestion for code change for some other architectures, but since I haven't tested them I haven't included in the patch.

-Janak

[PATCH 2/2] unshare system call: System Call setup for i386 arch

Signed-off-by Janak Desai

-----------------------------------------------------------------------

arch/i386/kernel/syscall_table.S +1 -0
diff -Naurp linux-2.6.12/arch/i386/kernel/syscall_table.S linux-2.6.12-unshare-p2/arch/i386/kernel/syscall_table.S
@@ -289,3 +289,4 @@ ENTRY(sys_call_table)
 	.long sys_add_key
 	.long sys_request_key
 	.long sys_keyctl
+	.long sys_unshare
include/asm-i386/unistd.h +2 -1
diff -Naurp linux-2.6.12/include/asm-i386/unistd.h linux-2.6.12-unshare-p2/include/asm-i386/unistd.h
@@ -294,8 +294,9 @@
 #define __NR_add_key		286
 #define __NR_request_key	287
 #define __NR_keyctl		288
+#define __NR_unshare		289
 
-#define NR_syscalls 289
+#define NR_syscalls 290
 
 /*
  * user-visible error numbers are in the range -1 - -128: see
include/linux/syscalls.h +2 -0
diff -Naurp linux-2.6.12/include/linux/syscalls.h linux-2.6.12-unshare-p2/include/linux/syscalls.h
@@ -505,4 +505,6 @@ asmlinkage long sys_request_key(const ch
 asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
 			   unsigned long arg4, unsigned long arg5);
 
+asmlinkage long sys_unshare(unsigned long unshare_flags);
+
 #endif