1 |
This is TOMOYO Linux patch for kernel 2.6.11. |
This is TOMOYO Linux patch for kernel 2.6.11.12. |
2 |
|
|
3 |
Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.tar.bz2 |
Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.12.tar.bz2 |
4 |
--- |
--- |
|
Makefile | 2 |
|
5 |
arch/alpha/kernel/ptrace.c | 9 ++ |
arch/alpha/kernel/ptrace.c | 9 ++ |
6 |
arch/arm/kernel/ptrace.c | 9 ++ |
arch/arm/kernel/ptrace.c | 9 ++ |
7 |
arch/arm26/kernel/ptrace.c | 9 ++ |
arch/arm26/kernel/ptrace.c | 9 ++ |
58 |
net/ipv6/udp.c | 16 ++++- |
net/ipv6/udp.c | 16 ++++- |
59 |
net/socket.c | 43 ++++++++++++- |
net/socket.c | 43 ++++++++++++- |
60 |
net/unix/af_unix.c | 15 ++++ |
net/unix/af_unix.c | 15 ++++ |
61 |
57 files changed, 846 insertions(+), 13 deletions(-) |
56 files changed, 845 insertions(+), 12 deletions(-) |
62 |
|
|
63 |
--- linux-2.6.11.orig/Makefile |
--- linux-2.6.11.12.orig/arch/alpha/kernel/ptrace.c |
64 |
+++ linux-2.6.11/Makefile |
+++ linux-2.6.11.12/arch/alpha/kernel/ptrace.c |
|
@@ -1,7 +1,7 @@ |
|
|
VERSION = 2 |
|
|
PATCHLEVEL = 6 |
|
|
SUBLEVEL = 11 |
|
|
-EXTRAVERSION = |
|
|
+EXTRAVERSION = -ccs |
|
|
NAME=Woozy Numbat |
|
|
|
|
|
# *DOCUMENTATION* |
|
|
--- linux-2.6.11.orig/arch/alpha/kernel/ptrace.c |
|
|
+++ linux-2.6.11/arch/alpha/kernel/ptrace.c |
|
65 |
@@ -19,6 +19,9 @@ |
@@ -19,6 +19,9 @@ |
66 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
67 |
#include <asm/system.h> |
#include <asm/system.h> |
85 |
|
|
86 |
lock_kernel(); |
lock_kernel(); |
87 |
DBG(DBG_MEM, ("request=%ld pid=%ld addr=0x%lx data=0x%lx\n", |
DBG(DBG_MEM, ("request=%ld pid=%ld addr=0x%lx data=0x%lx\n", |
88 |
--- linux-2.6.11.orig/arch/arm/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/arm/kernel/ptrace.c |
89 |
+++ linux-2.6.11/arch/arm/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/arm/kernel/ptrace.c |
90 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
91 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
92 |
#include <asm/system.h> |
#include <asm/system.h> |
110 |
|
|
111 |
lock_kernel(); |
lock_kernel(); |
112 |
ret = -EPERM; |
ret = -EPERM; |
113 |
--- linux-2.6.11.orig/arch/arm26/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/arm26/kernel/ptrace.c |
114 |
+++ linux-2.6.11/arch/arm26/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/arm26/kernel/ptrace.c |
115 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
116 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
117 |
#include <asm/system.h> |
#include <asm/system.h> |
135 |
|
|
136 |
lock_kernel(); |
lock_kernel(); |
137 |
ret = -EPERM; |
ret = -EPERM; |
138 |
--- linux-2.6.11.orig/arch/cris/arch-v10/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/cris/arch-v10/kernel/ptrace.c |
139 |
+++ linux-2.6.11/arch/cris/arch-v10/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/cris/arch-v10/kernel/ptrace.c |
140 |
@@ -16,6 +16,9 @@ |
@@ -16,6 +16,9 @@ |
141 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
142 |
#include <asm/system.h> |
#include <asm/system.h> |
160 |
|
|
161 |
lock_kernel(); |
lock_kernel(); |
162 |
ret = -EPERM; |
ret = -EPERM; |
163 |
--- linux-2.6.11.orig/arch/frv/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/frv/kernel/ptrace.c |
164 |
+++ linux-2.6.11/arch/frv/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/frv/kernel/ptrace.c |
165 |
@@ -27,6 +27,9 @@ |
@@ -27,6 +27,9 @@ |
166 |
#include <asm/system.h> |
#include <asm/system.h> |
167 |
#include <asm/processor.h> |
#include <asm/processor.h> |
185 |
lock_kernel(); |
lock_kernel(); |
186 |
ret = -EPERM; |
ret = -EPERM; |
187 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
188 |
--- linux-2.6.11.orig/arch/h8300/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/h8300/kernel/ptrace.c |
189 |
+++ linux-2.6.11/arch/h8300/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/h8300/kernel/ptrace.c |
190 |
@@ -31,6 +31,9 @@ |
@@ -31,6 +31,9 @@ |
191 |
#include <asm/system.h> |
#include <asm/system.h> |
192 |
#include <asm/processor.h> |
#include <asm/processor.h> |
210 |
|
|
211 |
lock_kernel(); |
lock_kernel(); |
212 |
ret = -EPERM; |
ret = -EPERM; |
213 |
--- linux-2.6.11.orig/arch/i386/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/i386/kernel/ptrace.c |
214 |
+++ linux-2.6.11/arch/i386/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/i386/kernel/ptrace.c |
215 |
@@ -24,6 +24,9 @@ |
@@ -24,6 +24,9 @@ |
216 |
#include <asm/debugreg.h> |
#include <asm/debugreg.h> |
217 |
#include <asm/ldt.h> |
#include <asm/ldt.h> |
235 |
|
|
236 |
lock_kernel(); |
lock_kernel(); |
237 |
ret = -EPERM; |
ret = -EPERM; |
238 |
--- linux-2.6.11.orig/arch/ia64/ia32/sys_ia32.c |
--- linux-2.6.11.12.orig/arch/ia64/ia32/sys_ia32.c |
239 |
+++ linux-2.6.11/arch/ia64/ia32/sys_ia32.c |
+++ linux-2.6.11.12/arch/ia64/ia32/sys_ia32.c |
240 |
@@ -56,6 +56,9 @@ |
@@ -56,6 +56,9 @@ |
241 |
#include <asm/types.h> |
#include <asm/types.h> |
242 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
260 |
|
|
261 |
lock_kernel(); |
lock_kernel(); |
262 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
263 |
--- linux-2.6.11.orig/arch/ia64/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/ia64/kernel/ptrace.c |
264 |
+++ linux-2.6.11/arch/ia64/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/ia64/kernel/ptrace.c |
265 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
266 |
#ifdef CONFIG_PERFMON |
#ifdef CONFIG_PERFMON |
267 |
#include <asm/perfmon.h> |
#include <asm/perfmon.h> |
285 |
|
|
286 |
lock_kernel(); |
lock_kernel(); |
287 |
ret = -EPERM; |
ret = -EPERM; |
288 |
--- linux-2.6.11.orig/arch/m32r/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/m32r/kernel/ptrace.c |
289 |
+++ linux-2.6.11/arch/m32r/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/m32r/kernel/ptrace.c |
290 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
291 |
#include <asm/system.h> |
#include <asm/system.h> |
292 |
#include <asm/processor.h> |
#include <asm/processor.h> |
310 |
|
|
311 |
lock_kernel(); |
lock_kernel(); |
312 |
ret = -EPERM; |
ret = -EPERM; |
313 |
--- linux-2.6.11.orig/arch/m68k/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/m68k/kernel/ptrace.c |
314 |
+++ linux-2.6.11/arch/m68k/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/m68k/kernel/ptrace.c |
315 |
@@ -25,6 +25,9 @@ |
@@ -25,6 +25,9 @@ |
316 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
317 |
#include <asm/system.h> |
#include <asm/system.h> |
335 |
|
|
336 |
lock_kernel(); |
lock_kernel(); |
337 |
ret = -EPERM; |
ret = -EPERM; |
338 |
--- linux-2.6.11.orig/arch/m68knommu/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/m68knommu/kernel/ptrace.c |
339 |
+++ linux-2.6.11/arch/m68knommu/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/m68knommu/kernel/ptrace.c |
340 |
@@ -25,6 +25,9 @@ |
@@ -25,6 +25,9 @@ |
341 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
342 |
#include <asm/system.h> |
#include <asm/system.h> |
360 |
|
|
361 |
lock_kernel(); |
lock_kernel(); |
362 |
ret = -EPERM; |
ret = -EPERM; |
363 |
--- linux-2.6.11.orig/arch/mips/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/mips/kernel/ptrace.c |
364 |
+++ linux-2.6.11/arch/mips/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/mips/kernel/ptrace.c |
365 |
@@ -34,6 +34,9 @@ |
@@ -34,6 +34,9 @@ |
366 |
#include <asm/system.h> |
#include <asm/system.h> |
367 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
385 |
|
|
386 |
#if 0 |
#if 0 |
387 |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
388 |
--- linux-2.6.11.orig/arch/mips/kernel/ptrace32.c |
--- linux-2.6.11.12.orig/arch/mips/kernel/ptrace32.c |
389 |
+++ linux-2.6.11/arch/mips/kernel/ptrace32.c |
+++ linux-2.6.11.12/arch/mips/kernel/ptrace32.c |
390 |
@@ -33,6 +33,9 @@ |
@@ -33,6 +33,9 @@ |
391 |
#include <asm/system.h> |
#include <asm/system.h> |
392 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
410 |
|
|
411 |
#if 0 |
#if 0 |
412 |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
413 |
--- linux-2.6.11.orig/arch/parisc/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/parisc/kernel/ptrace.c |
414 |
+++ linux-2.6.11/arch/parisc/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/parisc/kernel/ptrace.c |
415 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
416 |
#include <asm/system.h> |
#include <asm/system.h> |
417 |
#include <asm/processor.h> |
#include <asm/processor.h> |
435 |
|
|
436 |
lock_kernel(); |
lock_kernel(); |
437 |
ret = -EPERM; |
ret = -EPERM; |
438 |
--- linux-2.6.11.orig/arch/ppc/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/ppc/kernel/ptrace.c |
439 |
+++ linux-2.6.11/arch/ppc/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/ppc/kernel/ptrace.c |
440 |
@@ -31,6 +31,9 @@ |
@@ -31,6 +31,9 @@ |
441 |
#include <asm/page.h> |
#include <asm/page.h> |
442 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
460 |
|
|
461 |
lock_kernel(); |
lock_kernel(); |
462 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
463 |
--- linux-2.6.11.orig/arch/ppc64/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/ppc64/kernel/ptrace.c |
464 |
+++ linux-2.6.11/arch/ppc64/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/ppc64/kernel/ptrace.c |
465 |
@@ -33,6 +33,9 @@ |
@@ -33,6 +33,9 @@ |
466 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
467 |
#include <asm/system.h> |
#include <asm/system.h> |
485 |
|
|
486 |
lock_kernel(); |
lock_kernel(); |
487 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
488 |
--- linux-2.6.11.orig/arch/ppc64/kernel/ptrace32.c |
--- linux-2.6.11.12.orig/arch/ppc64/kernel/ptrace32.c |
489 |
+++ linux-2.6.11/arch/ppc64/kernel/ptrace32.c |
+++ linux-2.6.11.12/arch/ppc64/kernel/ptrace32.c |
490 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
491 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
492 |
#include <asm/system.h> |
#include <asm/system.h> |
510 |
|
|
511 |
lock_kernel(); |
lock_kernel(); |
512 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
513 |
--- linux-2.6.11.orig/arch/s390/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/s390/kernel/ptrace.c |
514 |
+++ linux-2.6.11/arch/s390/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/s390/kernel/ptrace.c |
515 |
@@ -38,6 +38,9 @@ |
@@ -38,6 +38,9 @@ |
516 |
#include <asm/pgalloc.h> |
#include <asm/pgalloc.h> |
517 |
#include <asm/system.h> |
#include <asm/system.h> |
535 |
|
|
536 |
lock_kernel(); |
lock_kernel(); |
537 |
|
|
538 |
--- linux-2.6.11.orig/arch/sh/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/sh/kernel/ptrace.c |
539 |
+++ linux-2.6.11/arch/sh/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/sh/kernel/ptrace.c |
540 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
541 |
#include <asm/system.h> |
#include <asm/system.h> |
542 |
#include <asm/processor.h> |
#include <asm/processor.h> |
560 |
|
|
561 |
lock_kernel(); |
lock_kernel(); |
562 |
ret = -EPERM; |
ret = -EPERM; |
563 |
--- linux-2.6.11.orig/arch/sh64/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/sh64/kernel/ptrace.c |
564 |
+++ linux-2.6.11/arch/sh64/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/sh64/kernel/ptrace.c |
565 |
@@ -34,6 +34,9 @@ |
@@ -34,6 +34,9 @@ |
566 |
#include <asm/system.h> |
#include <asm/system.h> |
567 |
#include <asm/processor.h> |
#include <asm/processor.h> |
585 |
|
|
586 |
lock_kernel(); |
lock_kernel(); |
587 |
ret = -EPERM; |
ret = -EPERM; |
588 |
--- linux-2.6.11.orig/arch/sparc/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/sparc/kernel/ptrace.c |
589 |
+++ linux-2.6.11/arch/sparc/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/sparc/kernel/ptrace.c |
590 |
@@ -22,6 +22,9 @@ |
@@ -22,6 +22,9 @@ |
591 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
592 |
#include <asm/system.h> |
#include <asm/system.h> |
612 |
|
|
613 |
lock_kernel(); |
lock_kernel(); |
614 |
#ifdef DEBUG_PTRACE |
#ifdef DEBUG_PTRACE |
615 |
--- linux-2.6.11.orig/arch/sparc64/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/sparc64/kernel/ptrace.c |
616 |
+++ linux-2.6.11/arch/sparc64/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/sparc64/kernel/ptrace.c |
617 |
@@ -27,6 +27,9 @@ |
@@ -27,6 +27,9 @@ |
618 |
#include <asm/psrcompat.h> |
#include <asm/psrcompat.h> |
619 |
#include <asm/visasm.h> |
#include <asm/visasm.h> |
639 |
|
|
640 |
if (test_thread_flag(TIF_32BIT)) { |
if (test_thread_flag(TIF_32BIT)) { |
641 |
addr &= 0xffffffffUL; |
addr &= 0xffffffffUL; |
642 |
--- linux-2.6.11.orig/arch/um/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/um/kernel/ptrace.c |
643 |
+++ linux-2.6.11/arch/um/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/um/kernel/ptrace.c |
644 |
@@ -17,6 +17,9 @@ |
@@ -17,6 +17,9 @@ |
645 |
#include "kern_util.h" |
#include "kern_util.h" |
646 |
#include "ptrace_user.h" |
#include "ptrace_user.h" |
664 |
|
|
665 |
lock_kernel(); |
lock_kernel(); |
666 |
ret = -EPERM; |
ret = -EPERM; |
667 |
--- linux-2.6.11.orig/arch/v850/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/v850/kernel/ptrace.c |
668 |
+++ linux-2.6.11/arch/v850/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/v850/kernel/ptrace.c |
669 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
670 |
#include <asm/ptrace.h> |
#include <asm/ptrace.h> |
671 |
#include <asm/processor.h> |
#include <asm/processor.h> |
689 |
|
|
690 |
lock_kernel(); |
lock_kernel(); |
691 |
|
|
692 |
--- linux-2.6.11.orig/arch/x86_64/ia32/ptrace32.c |
--- linux-2.6.11.12.orig/arch/x86_64/ia32/ptrace32.c |
693 |
+++ linux-2.6.11/arch/x86_64/ia32/ptrace32.c |
+++ linux-2.6.11.12/arch/x86_64/ia32/ptrace32.c |
694 |
@@ -27,6 +27,9 @@ |
@@ -27,6 +27,9 @@ |
695 |
#include <asm/debugreg.h> |
#include <asm/debugreg.h> |
696 |
#include <asm/i387.h> |
#include <asm/i387.h> |
714 |
|
|
715 |
switch (request) { |
switch (request) { |
716 |
default: |
default: |
717 |
--- linux-2.6.11.orig/arch/x86_64/kernel/ptrace.c |
--- linux-2.6.11.12.orig/arch/x86_64/kernel/ptrace.c |
718 |
+++ linux-2.6.11/arch/x86_64/kernel/ptrace.c |
+++ linux-2.6.11.12/arch/x86_64/kernel/ptrace.c |
719 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
720 |
#include <asm/desc.h> |
#include <asm/desc.h> |
721 |
#include <asm/proto.h> |
#include <asm/proto.h> |
726 |
|
|
727 |
/* |
/* |
728 |
* does not yet catch signals sent when the child dies. |
* does not yet catch signals sent when the child dies. |
729 |
@@ -185,6 +188,12 @@ asmlinkage long sys_ptrace(long request, |
@@ -190,6 +193,12 @@ asmlinkage long sys_ptrace(long request, |
730 |
struct task_struct *child; |
struct task_struct *child; |
731 |
long i, ret; |
long i, ret; |
732 |
unsigned ui; |
unsigned ui; |
739 |
|
|
740 |
/* This lock_kernel fixes a subtle race with suid exec */ |
/* This lock_kernel fixes a subtle race with suid exec */ |
741 |
lock_kernel(); |
lock_kernel(); |
742 |
--- linux-2.6.11.orig/fs/Kconfig |
--- linux-2.6.11.12.orig/fs/Kconfig |
743 |
+++ linux-2.6.11/fs/Kconfig |
+++ linux-2.6.11.12/fs/Kconfig |
744 |
@@ -1724,5 +1724,7 @@ endmenu |
@@ -1724,5 +1724,7 @@ endmenu |
745 |
|
|
746 |
source "fs/nls/Kconfig" |
source "fs/nls/Kconfig" |
749 |
+ |
+ |
750 |
endmenu |
endmenu |
751 |
|
|
752 |
--- linux-2.6.11.orig/fs/Makefile |
--- linux-2.6.11.12.orig/fs/Makefile |
753 |
+++ linux-2.6.11/fs/Makefile |
+++ linux-2.6.11.12/fs/Makefile |
754 |
@@ -95,3 +95,5 @@ obj-$(CONFIG_BEFS_FS) += befs/ |
@@ -95,3 +95,5 @@ obj-$(CONFIG_BEFS_FS) += befs/ |
755 |
obj-$(CONFIG_HOSTFS) += hostfs/ |
obj-$(CONFIG_HOSTFS) += hostfs/ |
756 |
obj-$(CONFIG_HPPFS) += hppfs/ |
obj-$(CONFIG_HPPFS) += hppfs/ |
757 |
obj-$(CONFIG_DEBUG_FS) += debugfs/ |
obj-$(CONFIG_DEBUG_FS) += debugfs/ |
758 |
+ |
+ |
759 |
+include $(srctree)/fs/Makefile-2.6.ccs |
+include $(srctree)/fs/Makefile-2.6.ccs |
760 |
--- linux-2.6.11.orig/fs/attr.c |
--- linux-2.6.11.12.orig/fs/attr.c |
761 |
+++ linux-2.6.11/fs/attr.c |
+++ linux-2.6.11.12/fs/attr.c |
762 |
@@ -15,6 +15,9 @@ |
@@ -15,6 +15,9 @@ |
763 |
#include <linux/quotaops.h> |
#include <linux/quotaops.h> |
764 |
#include <linux/security.h> |
#include <linux/security.h> |
798 |
if (!error) { |
if (!error) { |
799 |
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || |
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || |
800 |
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) |
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) |
801 |
--- linux-2.6.11.orig/fs/compat.c |
--- linux-2.6.11.12.orig/fs/compat.c |
802 |
+++ linux-2.6.11/fs/compat.c |
+++ linux-2.6.11.12/fs/compat.c |
803 |
@@ -49,6 +49,9 @@ |
@@ -49,6 +49,9 @@ |
804 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
805 |
#include <asm/mmu_context.h> |
#include <asm/mmu_context.h> |
832 |
if (retval >= 0) { |
if (retval >= 0) { |
833 |
free_arg_pages(bprm); |
free_arg_pages(bprm); |
834 |
|
|
835 |
--- linux-2.6.11.orig/fs/exec.c |
--- linux-2.6.11.12.orig/fs/exec.c |
836 |
+++ linux-2.6.11/fs/exec.c |
+++ linux-2.6.11.12/fs/exec.c |
837 |
@@ -56,6 +56,10 @@ |
@@ -56,6 +56,10 @@ |
838 |
#include <linux/kmod.h> |
#include <linux/kmod.h> |
839 |
#endif |
#endif |
883 |
if (retval >= 0) { |
if (retval >= 0) { |
884 |
free_arg_pages(bprm); |
free_arg_pages(bprm); |
885 |
|
|
886 |
--- linux-2.6.11.orig/fs/fcntl.c |
--- linux-2.6.11.12.orig/fs/fcntl.c |
887 |
+++ linux-2.6.11/fs/fcntl.c |
+++ linux-2.6.11.12/fs/fcntl.c |
888 |
@@ -19,6 +19,9 @@ |
@@ -19,6 +19,9 @@ |
889 |
#include <asm/poll.h> |
#include <asm/poll.h> |
890 |
#include <asm/siginfo.h> |
#include <asm/siginfo.h> |
907 |
/* O_NOATIME can only be set by the owner or superuser */ |
/* O_NOATIME can only be set by the owner or superuser */ |
908 |
if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) |
if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) |
909 |
if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) |
if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) |
910 |
--- linux-2.6.11.orig/fs/ioctl.c |
--- linux-2.6.11.12.orig/fs/ioctl.c |
911 |
+++ linux-2.6.11/fs/ioctl.c |
+++ linux-2.6.11.12/fs/ioctl.c |
912 |
@@ -15,6 +15,9 @@ |
@@ -15,6 +15,9 @@ |
913 |
|
|
914 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
930 |
|
|
931 |
if (filp->f_op->unlocked_ioctl) { |
if (filp->f_op->unlocked_ioctl) { |
932 |
error = filp->f_op->unlocked_ioctl(filp, cmd, arg); |
error = filp->f_op->unlocked_ioctl(filp, cmd, arg); |
933 |
--- linux-2.6.11.orig/fs/namei.c |
--- linux-2.6.11.12.orig/fs/namei.c |
934 |
+++ linux-2.6.11/fs/namei.c |
+++ linux-2.6.11.12/fs/namei.c |
935 |
@@ -33,6 +33,10 @@ |
@@ -33,6 +33,10 @@ |
936 |
|
|
937 |
#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) |
#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) |
1166 |
|
|
1167 |
from = getname(oldname); |
from = getname(oldname); |
1168 |
if(IS_ERR(from)) |
if(IS_ERR(from)) |
1169 |
--- linux-2.6.11.orig/fs/namespace.c |
--- linux-2.6.11.12.orig/fs/namespace.c |
1170 |
+++ linux-2.6.11/fs/namespace.c |
+++ linux-2.6.11.12/fs/namespace.c |
1171 |
@@ -24,6 +24,12 @@ |
@@ -24,6 +24,12 @@ |
1172 |
#include <linux/mount.h> |
#include <linux/mount.h> |
1173 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1292 |
if (error) { |
if (error) { |
1293 |
path_release(&old_nd); |
path_release(&old_nd); |
1294 |
goto out1; |
goto out1; |
1295 |
--- linux-2.6.11.orig/fs/open.c |
--- linux-2.6.11.12.orig/fs/open.c |
1296 |
+++ linux-2.6.11/fs/open.c |
+++ linux-2.6.11.12/fs/open.c |
1297 |
@@ -26,6 +26,13 @@ |
@@ -26,6 +26,13 @@ |
1298 |
|
|
1299 |
#include <asm/unistd.h> |
#include <asm/unistd.h> |
1357 |
if (capable(CAP_SYS_TTY_CONFIG)) { |
if (capable(CAP_SYS_TTY_CONFIG)) { |
1358 |
tty_vhangup(current->signal->tty); |
tty_vhangup(current->signal->tty); |
1359 |
return 0; |
return 0; |
1360 |
--- linux-2.6.11.orig/fs/proc/Makefile |
--- linux-2.6.11.12.orig/fs/proc/Makefile |
1361 |
+++ linux-2.6.11/fs/proc/Makefile |
+++ linux-2.6.11.12/fs/proc/Makefile |
1362 |
@@ -12,3 +12,6 @@ proc-y += inode.o root.o base.o ge |
@@ -12,3 +12,6 @@ proc-y += inode.o root.o base.o ge |
1363 |
|
|
1364 |
proc-$(CONFIG_PROC_KCORE) += kcore.o |
proc-$(CONFIG_PROC_KCORE) += kcore.o |
1366 |
+ |
+ |
1367 |
+proc-$(CONFIG_SAKURA) += ccs_proc.o |
+proc-$(CONFIG_SAKURA) += ccs_proc.o |
1368 |
+proc-$(CONFIG_TOMOYO) += ccs_proc.o |
+proc-$(CONFIG_TOMOYO) += ccs_proc.o |
1369 |
--- linux-2.6.11.orig/fs/proc/proc_misc.c |
--- linux-2.6.11.12.orig/fs/proc/proc_misc.c |
1370 |
+++ linux-2.6.11/fs/proc/proc_misc.c |
+++ linux-2.6.11.12/fs/proc/proc_misc.c |
1371 |
@@ -612,4 +612,9 @@ void __init proc_misc_init(void) |
@@ -612,4 +612,9 @@ void __init proc_misc_init(void) |
1372 |
entry->proc_fops = &ppc_htab_operations; |
entry->proc_fops = &ppc_htab_operations; |
1373 |
} |
} |
1374 |
#endif |
#endif |
1375 |
+ /***** CCS start. *****/ |
+ /***** CCS start. *****/ |
1376 |
+#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO) |
+#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO) |
1377 |
+ printk(KERN_INFO "Hook version: 2.6.11 2008/06/25\n"); |
+ printk(KERN_INFO "Hook version: 2.6.11.12 2008/08/27\n"); |
1378 |
+#endif |
+#endif |
1379 |
+ /***** CCS end. *****/ |
+ /***** CCS end. *****/ |
1380 |
} |
} |
1381 |
--- linux-2.6.11.orig/include/linux/init_task.h |
--- linux-2.6.11.12.orig/include/linux/init_task.h |
1382 |
+++ linux-2.6.11/include/linux/init_task.h |
+++ linux-2.6.11.12/include/linux/init_task.h |
1383 |
@@ -112,6 +112,10 @@ extern struct group_info init_groups; |
@@ -112,6 +112,10 @@ extern struct group_info init_groups; |
1384 |
.proc_lock = SPIN_LOCK_UNLOCKED, \ |
.proc_lock = SPIN_LOCK_UNLOCKED, \ |
1385 |
.switch_lock = SPIN_LOCK_UNLOCKED, \ |
.switch_lock = SPIN_LOCK_UNLOCKED, \ |
1391 |
} |
} |
1392 |
|
|
1393 |
|
|
1394 |
--- linux-2.6.11.orig/include/linux/sched.h |
--- linux-2.6.11.12.orig/include/linux/sched.h |
1395 |
+++ linux-2.6.11/include/linux/sched.h |
+++ linux-2.6.11.12/include/linux/sched.h |
1396 |
@@ -35,6 +35,11 @@ |
@@ -35,6 +35,11 @@ |
1397 |
|
|
1398 |
struct exec_domain; |
struct exec_domain; |
1416 |
}; |
}; |
1417 |
|
|
1418 |
static inline pid_t process_group(struct task_struct *tsk) |
static inline pid_t process_group(struct task_struct *tsk) |
1419 |
--- linux-2.6.11.orig/kernel/compat.c |
--- linux-2.6.11.12.orig/kernel/compat.c |
1420 |
+++ linux-2.6.11/kernel/compat.c |
+++ linux-2.6.11.12/kernel/compat.c |
1421 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
1422 |
#include <linux/security.h> |
#include <linux/security.h> |
1423 |
|
|
1439 |
|
|
1440 |
do_settimeofday(&tv); |
do_settimeofday(&tv); |
1441 |
return 0; |
return 0; |
1442 |
--- linux-2.6.11.orig/kernel/kmod.c |
--- linux-2.6.11.12.orig/kernel/kmod.c |
1443 |
+++ linux-2.6.11/kernel/kmod.c |
+++ linux-2.6.11.12/kernel/kmod.c |
1444 |
@@ -143,6 +143,11 @@ static int ____call_usermodehelper(void |
@@ -143,6 +143,11 @@ static int ____call_usermodehelper(void |
1445 |
/* We can run anywhere, unlike our parent keventd(). */ |
/* We can run anywhere, unlike our parent keventd(). */ |
1446 |
set_cpus_allowed(current, CPU_MASK_ALL); |
set_cpus_allowed(current, CPU_MASK_ALL); |
1453 |
retval = -EPERM; |
retval = -EPERM; |
1454 |
if (current->fs->root) |
if (current->fs->root) |
1455 |
retval = execve(sub_info->path, sub_info->argv,sub_info->envp); |
retval = execve(sub_info->path, sub_info->argv,sub_info->envp); |
1456 |
--- linux-2.6.11.orig/kernel/module.c |
--- linux-2.6.11.12.orig/kernel/module.c |
1457 |
+++ linux-2.6.11/kernel/module.c |
+++ linux-2.6.11.12/kernel/module.c |
1458 |
@@ -38,6 +38,9 @@ |
@@ -38,6 +38,9 @@ |
1459 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1460 |
#include <asm/semaphore.h> |
#include <asm/semaphore.h> |
1489 |
/* Only one module load at a time, please */ |
/* Only one module load at a time, please */ |
1490 |
if (down_interruptible(&module_mutex) != 0) |
if (down_interruptible(&module_mutex) != 0) |
1491 |
return -EINTR; |
return -EINTR; |
1492 |
--- linux-2.6.11.orig/kernel/sched.c |
--- linux-2.6.11.12.orig/kernel/sched.c |
1493 |
+++ linux-2.6.11/kernel/sched.c |
+++ linux-2.6.11.12/kernel/sched.c |
1494 |
@@ -48,6 +48,9 @@ |
@@ -48,6 +48,9 @@ |
1495 |
#include <asm/tlb.h> |
#include <asm/tlb.h> |
1496 |
|
|
1512 |
|
|
1513 |
/* |
/* |
1514 |
* Setpriority might change our priority at the same moment. |
* Setpriority might change our priority at the same moment. |
1515 |
--- linux-2.6.11.orig/kernel/signal.c |
--- linux-2.6.11.12.orig/kernel/signal.c |
1516 |
+++ linux-2.6.11/kernel/signal.c |
+++ linux-2.6.11.12/kernel/signal.c |
1517 |
@@ -26,6 +26,9 @@ |
@@ -26,6 +26,9 @@ |
1518 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1519 |
#include <asm/unistd.h> |
#include <asm/unistd.h> |
1524 |
|
|
1525 |
extern void k_getrusage(struct task_struct *, int, struct rusage *); |
extern void k_getrusage(struct task_struct *, int, struct rusage *); |
1526 |
|
|
1527 |
@@ -2229,6 +2232,12 @@ asmlinkage long |
@@ -2230,6 +2233,12 @@ asmlinkage long |
1528 |
sys_kill(int pid, int sig) |
sys_kill(int pid, int sig) |
1529 |
{ |
{ |
1530 |
struct siginfo info; |
struct siginfo info; |
1537 |
|
|
1538 |
info.si_signo = sig; |
info.si_signo = sig; |
1539 |
info.si_errno = 0; |
info.si_errno = 0; |
1540 |
@@ -2259,6 +2268,13 @@ asmlinkage long sys_tgkill(int tgid, int |
@@ -2260,6 +2269,13 @@ asmlinkage long sys_tgkill(int tgid, int |
1541 |
if (pid <= 0 || tgid <= 0) |
if (pid <= 0 || tgid <= 0) |
1542 |
return -EINVAL; |
return -EINVAL; |
1543 |
|
|
1551 |
info.si_signo = sig; |
info.si_signo = sig; |
1552 |
info.si_errno = 0; |
info.si_errno = 0; |
1553 |
info.si_code = SI_TKILL; |
info.si_code = SI_TKILL; |
1554 |
@@ -2299,6 +2315,12 @@ sys_tkill(int pid, int sig) |
@@ -2300,6 +2316,12 @@ sys_tkill(int pid, int sig) |
1555 |
if (pid <= 0) |
if (pid <= 0) |
1556 |
return -EINVAL; |
return -EINVAL; |
1557 |
|
|
1564 |
info.si_signo = sig; |
info.si_signo = sig; |
1565 |
info.si_errno = 0; |
info.si_errno = 0; |
1566 |
info.si_code = SI_TKILL; |
info.si_code = SI_TKILL; |
1567 |
--- linux-2.6.11.orig/kernel/sys.c |
--- linux-2.6.11.12.orig/kernel/sys.c |
1568 |
+++ linux-2.6.11/kernel/sys.c |
+++ linux-2.6.11.12/kernel/sys.c |
1569 |
@@ -31,6 +31,9 @@ |
@@ -31,6 +31,9 @@ |
1570 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1571 |
#include <asm/io.h> |
#include <asm/io.h> |
1622 |
|
|
1623 |
down_write(&uts_sem); |
down_write(&uts_sem); |
1624 |
errno = -EFAULT; |
errno = -EFAULT; |
1625 |
--- linux-2.6.11.orig/kernel/sysctl.c |
--- linux-2.6.11.12.orig/kernel/sysctl.c |
1626 |
+++ linux-2.6.11/kernel/sysctl.c |
+++ linux-2.6.11.12/kernel/sysctl.c |
1627 |
@@ -44,6 +44,9 @@ |
@@ -44,6 +44,9 @@ |
1628 |
|
|
1629 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1775 |
} |
} |
1776 |
|
|
1777 |
/* |
/* |
1778 |
--- linux-2.6.11.orig/kernel/time.c |
--- linux-2.6.11.12.orig/kernel/time.c |
1779 |
+++ linux-2.6.11/kernel/time.c |
+++ linux-2.6.11.12/kernel/time.c |
1780 |
@@ -37,6 +37,9 @@ |
@@ -37,6 +37,9 @@ |
1781 |
|
|
1782 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1820 |
|
|
1821 |
/* Now we validate the data before disabling interrupts */ |
/* Now we validate the data before disabling interrupts */ |
1822 |
|
|
1823 |
--- linux-2.6.11.orig/net/core/datagram.c |
--- linux-2.6.11.12.orig/net/core/datagram.c |
1824 |
+++ linux-2.6.11/net/core/datagram.c |
+++ linux-2.6.11.12/net/core/datagram.c |
1825 |
@@ -54,6 +54,10 @@ |
@@ -54,6 +54,10 @@ |
1826 |
#include <net/sock.h> |
#include <net/sock.h> |
1827 |
#include <net/checksum.h> |
#include <net/checksum.h> |
1846 |
if (skb) |
if (skb) |
1847 |
return skb; |
return skb; |
1848 |
|
|
1849 |
--- linux-2.6.11.orig/net/ipv4/tcp_ipv4.c |
--- linux-2.6.11.12.orig/net/ipv4/tcp_ipv4.c |
1850 |
+++ linux-2.6.11/net/ipv4/tcp_ipv4.c |
+++ linux-2.6.11.12/net/ipv4/tcp_ipv4.c |
1851 |
@@ -74,6 +74,9 @@ |
@@ -74,6 +74,9 @@ |
1852 |
#include <linux/stddef.h> |
#include <linux/stddef.h> |
1853 |
#include <linux/proc_fs.h> |
#include <linux/proc_fs.h> |
1880 |
head = &tcp_bhash[tcp_bhashfn(port)]; |
head = &tcp_bhash[tcp_bhashfn(port)]; |
1881 |
spin_lock(&head->lock); |
spin_lock(&head->lock); |
1882 |
|
|
1883 |
--- linux-2.6.11.orig/net/ipv4/udp.c |
--- linux-2.6.11.12.orig/net/ipv4/udp.c |
1884 |
+++ linux-2.6.11/net/ipv4/udp.c |
+++ linux-2.6.11.12/net/ipv4/udp.c |
1885 |
@@ -107,6 +107,9 @@ |
@@ -107,6 +107,9 @@ |
1886 |
#include <net/inet_common.h> |
#include <net/inet_common.h> |
1887 |
#include <net/checksum.h> |
#include <net/checksum.h> |
1914 |
if (!udp_lport_inuse(result)) |
if (!udp_lport_inuse(result)) |
1915 |
break; |
break; |
1916 |
} |
} |
1917 |
--- linux-2.6.11.orig/net/ipv6/tcp_ipv6.c |
--- linux-2.6.11.12.orig/net/ipv6/tcp_ipv6.c |
1918 |
+++ linux-2.6.11/net/ipv6/tcp_ipv6.c |
+++ linux-2.6.11.12/net/ipv6/tcp_ipv6.c |
1919 |
@@ -63,6 +63,9 @@ |
@@ -63,6 +63,9 @@ |
1920 |
|
|
1921 |
#include <linux/proc_fs.h> |
#include <linux/proc_fs.h> |
1937 |
tb_for_each(tb, node, &head->chain) |
tb_for_each(tb, node, &head->chain) |
1938 |
if (tb->port == rover) |
if (tb->port == rover) |
1939 |
goto next; |
goto next; |
1940 |
--- linux-2.6.11.orig/net/ipv6/udp.c |
--- linux-2.6.11.12.orig/net/ipv6/udp.c |
1941 |
+++ linux-2.6.11/net/ipv6/udp.c |
+++ linux-2.6.11.12/net/ipv6/udp.c |
1942 |
@@ -57,6 +57,9 @@ |
@@ -57,6 +57,9 @@ |
1943 |
|
|
1944 |
#include <linux/proc_fs.h> |
#include <linux/proc_fs.h> |
1983 |
gotit: |
gotit: |
1984 |
udp_port_rover = snum = result; |
udp_port_rover = snum = result; |
1985 |
} else { |
} else { |
1986 |
--- linux-2.6.11.orig/net/socket.c |
--- linux-2.6.11.12.orig/net/socket.c |
1987 |
+++ linux-2.6.11/net/socket.c |
+++ linux-2.6.11.12/net/socket.c |
1988 |
@@ -94,6 +94,11 @@ |
@@ -94,6 +94,11 @@ |
1989 |
#include <net/sock.h> |
#include <net/sock.h> |
1990 |
#include <linux/netfilter.h> |
#include <linux/netfilter.h> |
2077 |
err = sock->ops->connect(sock, (struct sockaddr *) address, addrlen, |
err = sock->ops->connect(sock, (struct sockaddr *) address, addrlen, |
2078 |
sock->file->f_flags); |
sock->file->f_flags); |
2079 |
out_put: |
out_put: |
2080 |
--- linux-2.6.11.orig/net/unix/af_unix.c |
--- linux-2.6.11.12.orig/net/unix/af_unix.c |
2081 |
+++ linux-2.6.11/net/unix/af_unix.c |
+++ linux-2.6.11.12/net/unix/af_unix.c |
2082 |
@@ -118,6 +118,9 @@ |
@@ -118,6 +118,9 @@ |
2083 |
#include <linux/mount.h> |
#include <linux/mount.h> |
2084 |
#include <net/checksum.h> |
#include <net/checksum.h> |