オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.4.37.diff

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2299 by kumaneko, Mon Mar 23 06:08:10 2009 UTC revision 2781 by kumaneko, Mon Jul 20 05:40:07 2009 UTC
# Line 1  Line 1 
1  This is TOMOYO Linux patch for kernel 2.4.37.  This is TOMOYO Linux patch for kernel 2.4.37.3.
2    
3  Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.37.tar.bz2  Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.37.3.tar.bz2
4  ---  ---
5   Documentation/Configure.help |   86 +++++++++++++++++++++++++++++++++++++++++++   Documentation/Configure.help |   86 +++++++++++++++++++++++++++++++++++++++++++
6   arch/alpha/kernel/ptrace.c   |    7 +++   arch/alpha/kernel/ptrace.c   |    7 +++
# Line 27  Source code for this patch is http://www Line 27  Source code for this patch is http://www
27   fs/Config.in                 |    3 +   fs/Config.in                 |    3 +
28   fs/Makefile                  |    2 -   fs/Makefile                  |    2 -
29   fs/attr.c                    |   10 +++++   fs/attr.c                    |   10 +++++
30   fs/exec.c                    |   21 ++++++++++   fs/exec.c                    |   18 ++++++++-
31   fs/fcntl.c                   |    8 ++++   fs/fcntl.c                   |    8 ++++
32   fs/ioctl.c                   |   16 ++++++++   fs/ioctl.c                   |   16 ++++++++
33   fs/namei.c                   |   71 +++++++++++++++++++++++++++++++++++   fs/namei.c                   |   71 +++++++++++++++++++++++++++++++++++
# Line 43  Source code for this patch is http://www Line 43  Source code for this patch is http://www
43   kernel/sys.c                 |   19 +++++++++   kernel/sys.c                 |   19 +++++++++
44   kernel/sysctl.c              |   19 +++++++++   kernel/sysctl.c              |   19 +++++++++
45   kernel/time.c                |   15 +++++++   kernel/time.c                |   15 +++++++
46   net/core/datagram.c          |   10 +++++   net/ipv4/raw.c               |    8 ++++
47   net/ipv4/tcp_ipv4.c          |   11 +++++   net/ipv4/tcp_ipv4.c          |   11 +++++
48   net/ipv4/udp.c               |   11 +++++   net/ipv4/udp.c               |   19 +++++++++
49     net/ipv6/raw.c               |    8 ++++
50   net/ipv6/tcp_ipv6.c          |    7 +++   net/ipv6/tcp_ipv6.c          |    7 +++
51   net/ipv6/udp.c               |   11 +++++   net/ipv6/udp.c               |   19 +++++++++
52   net/socket.c                 |   40 +++++++++++++++++++-   net/socket.c                 |   40 +++++++++++++++++++-
53   net/unix/af_unix.c           |    8 ++++   net/unix/af_unix.c           |    8 ++++
54   48 files changed, 668 insertions(+), 6 deletions(-)   49 files changed, 687 insertions(+), 6 deletions(-)
55    
56  --- linux-2.4.37.orig/Documentation/Configure.help  --- linux-2.4.37.3.orig/Documentation/Configure.help
57  +++ linux-2.4.37/Documentation/Configure.help  +++ linux-2.4.37.3/Documentation/Configure.help
58  @@ -29158,6 +29158,92 @@ CONFIG_SOUND_WM97XX  @@ -29158,6 +29158,92 @@ CONFIG_SOUND_WM97XX
59        
60     If unsure, say N.     If unsure, say N.
# Line 147  Source code for this patch is http://www Line 148  Source code for this patch is http://www
148   #   #
149   # A couple of things I keep forgetting:   # A couple of things I keep forgetting:
150   #   capitalize: AppleTalk, Ethernet, DOS, DMA, FAT, FTP, Internet,   #   capitalize: AppleTalk, Ethernet, DOS, DMA, FAT, FTP, Internet,
151  --- linux-2.4.37.orig/arch/alpha/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/alpha/kernel/ptrace.c
152  +++ linux-2.4.37/arch/alpha/kernel/ptrace.c  +++ linux-2.4.37.3/arch/alpha/kernel/ptrace.c
153  @@ -18,6 +18,9 @@  @@ -18,6 +18,9 @@
154   #include <asm/pgtable.h>   #include <asm/pgtable.h>
155   #include <asm/system.h>   #include <asm/system.h>
# Line 170  Source code for this patch is http://www Line 171  Source code for this patch is http://www
171    
172          lock_kernel();          lock_kernel();
173          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",
174  --- linux-2.4.37.orig/arch/arm/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/arm/kernel/ptrace.c
175  +++ linux-2.4.37/arch/arm/kernel/ptrace.c  +++ linux-2.4.37.3/arch/arm/kernel/ptrace.c
176  @@ -22,6 +22,9 @@  @@ -22,6 +22,9 @@
177   #include <asm/uaccess.h>   #include <asm/uaccess.h>
178   #include <asm/pgtable.h>   #include <asm/pgtable.h>
# Line 193  Source code for this patch is http://www Line 194  Source code for this patch is http://www
194    
195          lock_kernel();          lock_kernel();
196          ret = -EPERM;          ret = -EPERM;
197  --- linux-2.4.37.orig/arch/cris/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/cris/kernel/ptrace.c
198  +++ linux-2.4.37/arch/cris/kernel/ptrace.c  +++ linux-2.4.37.3/arch/cris/kernel/ptrace.c
199  @@ -48,6 +48,9 @@  @@ -48,6 +48,9 @@
200   #include <asm/pgtable.h>   #include <asm/pgtable.h>
201   #include <asm/system.h>   #include <asm/system.h>
# Line 216  Source code for this patch is http://www Line 217  Source code for this patch is http://www
217    
218          lock_kernel();          lock_kernel();
219          ret = -EPERM;          ret = -EPERM;
220  --- linux-2.4.37.orig/arch/i386/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/i386/kernel/ptrace.c
221  +++ linux-2.4.37/arch/i386/kernel/ptrace.c  +++ linux-2.4.37.3/arch/i386/kernel/ptrace.c
222  @@ -20,6 +20,9 @@  @@ -20,6 +20,9 @@
223   #include <asm/processor.h>   #include <asm/processor.h>
224   #include <asm/i387.h>   #include <asm/i387.h>
# Line 239  Source code for this patch is http://www Line 240  Source code for this patch is http://www
240    
241          lock_kernel();          lock_kernel();
242          ret = -EPERM;          ret = -EPERM;
243  --- linux-2.4.37.orig/arch/ia64/ia32/sys_ia32.c  --- linux-2.4.37.3.orig/arch/ia64/ia32/sys_ia32.c
244  +++ linux-2.4.37/arch/ia64/ia32/sys_ia32.c  +++ linux-2.4.37.3/arch/ia64/ia32/sys_ia32.c
245  @@ -57,6 +57,9 @@  @@ -57,6 +57,9 @@
246   #include <net/scm.h>   #include <net/scm.h>
247   #include <net/sock.h>   #include <net/sock.h>
# Line 262  Source code for this patch is http://www Line 263  Source code for this patch is http://www
263    
264          lock_kernel();          lock_kernel();
265          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
266  --- linux-2.4.37.orig/arch/ia64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/ia64/kernel/ptrace.c
267  +++ linux-2.4.37/arch/ia64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/ia64/kernel/ptrace.c
268  @@ -27,6 +27,9 @@  @@ -27,6 +27,9 @@
269   #ifdef CONFIG_PERFMON   #ifdef CONFIG_PERFMON
270   #include <asm/perfmon.h>   #include <asm/perfmon.h>
# Line 285  Source code for this patch is http://www Line 286  Source code for this patch is http://www
286    
287          lock_kernel();          lock_kernel();
288          ret = -EPERM;          ret = -EPERM;
289  --- linux-2.4.37.orig/arch/m68k/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/m68k/kernel/ptrace.c
290  +++ linux-2.4.37/arch/m68k/kernel/ptrace.c  +++ linux-2.4.37.3/arch/m68k/kernel/ptrace.c
291  @@ -25,6 +25,9 @@  @@ -25,6 +25,9 @@
292   #include <asm/pgtable.h>   #include <asm/pgtable.h>
293   #include <asm/system.h>   #include <asm/system.h>
# Line 308  Source code for this patch is http://www Line 309  Source code for this patch is http://www
309    
310          lock_kernel();          lock_kernel();
311          ret = -EPERM;          ret = -EPERM;
312  --- linux-2.4.37.orig/arch/mips/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/mips/kernel/ptrace.c
313  +++ linux-2.4.37/arch/mips/kernel/ptrace.c  +++ linux-2.4.37.3/arch/mips/kernel/ptrace.c
314  @@ -28,6 +28,9 @@  @@ -28,6 +28,9 @@
315   #include <asm/bootinfo.h>   #include <asm/bootinfo.h>
316   #include <asm/cpu.h>   #include <asm/cpu.h>
# Line 331  Source code for this patch is http://www Line 332  Source code for this patch is http://www
332    
333          lock_kernel();          lock_kernel();
334   #if 0   #if 0
335  --- linux-2.4.37.orig/arch/mips64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/mips64/kernel/ptrace.c
336  +++ linux-2.4.37/arch/mips64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/mips64/kernel/ptrace.c
337  @@ -30,6 +30,9 @@  @@ -30,6 +30,9 @@
338   #include <asm/system.h>   #include <asm/system.h>
339   #include <asm/uaccess.h>   #include <asm/uaccess.h>
# Line 365  Source code for this patch is http://www Line 366  Source code for this patch is http://www
366    
367          lock_kernel();          lock_kernel();
368   #if 0   #if 0
369  --- linux-2.4.37.orig/arch/parisc/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/parisc/kernel/ptrace.c
370  +++ linux-2.4.37/arch/parisc/kernel/ptrace.c  +++ linux-2.4.37.3/arch/parisc/kernel/ptrace.c
371  @@ -21,6 +21,9 @@  @@ -21,6 +21,9 @@
372   #include <asm/system.h>   #include <asm/system.h>
373   #include <asm/processor.h>   #include <asm/processor.h>
# Line 388  Source code for this patch is http://www Line 389  Source code for this patch is http://www
389    
390          lock_kernel();          lock_kernel();
391          ret = -EPERM;          ret = -EPERM;
392  --- linux-2.4.37.orig/arch/ppc/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/ppc/kernel/ptrace.c
393  +++ linux-2.4.37/arch/ppc/kernel/ptrace.c  +++ linux-2.4.37.3/arch/ppc/kernel/ptrace.c
394  @@ -29,6 +29,9 @@  @@ -29,6 +29,9 @@
395   #include <asm/page.h>   #include <asm/page.h>
396   #include <asm/pgtable.h>   #include <asm/pgtable.h>
# Line 411  Source code for this patch is http://www Line 412  Source code for this patch is http://www
412    
413          lock_kernel();          lock_kernel();
414          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
415  --- linux-2.4.37.orig/arch/ppc64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/ppc64/kernel/ptrace.c
416  +++ linux-2.4.37/arch/ppc64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/ppc64/kernel/ptrace.c
417  @@ -30,6 +30,9 @@  @@ -30,6 +30,9 @@
418   #include <asm/page.h>   #include <asm/page.h>
419   #include <asm/pgtable.h>   #include <asm/pgtable.h>
# Line 434  Source code for this patch is http://www Line 435  Source code for this patch is http://www
435    
436          lock_kernel();          lock_kernel();
437          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
438  --- linux-2.4.37.orig/arch/ppc64/kernel/ptrace32.c  --- linux-2.4.37.3.orig/arch/ppc64/kernel/ptrace32.c
439  +++ linux-2.4.37/arch/ppc64/kernel/ptrace32.c  +++ linux-2.4.37.3/arch/ppc64/kernel/ptrace32.c
440  @@ -30,6 +30,9 @@  @@ -30,6 +30,9 @@
441   #include <asm/page.h>   #include <asm/page.h>
442   #include <asm/pgtable.h>   #include <asm/pgtable.h>
# Line 457  Source code for this patch is http://www Line 458  Source code for this patch is http://www
458    
459          lock_kernel();          lock_kernel();
460          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
461  --- linux-2.4.37.orig/arch/s390/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/s390/kernel/ptrace.c
462  +++ linux-2.4.37/arch/s390/kernel/ptrace.c  +++ linux-2.4.37.3/arch/s390/kernel/ptrace.c
463  @@ -37,6 +37,9 @@  @@ -37,6 +37,9 @@
464   #include <asm/pgalloc.h>   #include <asm/pgalloc.h>
465   #include <asm/system.h>   #include <asm/system.h>
# Line 480  Source code for this patch is http://www Line 481  Source code for this patch is http://www
481    
482          lock_kernel();          lock_kernel();
483          if (request == PTRACE_TRACEME)          if (request == PTRACE_TRACEME)
484  --- linux-2.4.37.orig/arch/s390x/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/s390x/kernel/ptrace.c
485  +++ linux-2.4.37/arch/s390x/kernel/ptrace.c  +++ linux-2.4.37.3/arch/s390x/kernel/ptrace.c
486  @@ -43,6 +43,9 @@  @@ -43,6 +43,9 @@
487   #else   #else
488   #define parent_31bit 0   #define parent_31bit 0
# Line 503  Source code for this patch is http://www Line 504  Source code for this patch is http://www
504          lock_kernel();          lock_kernel();
505          if (request == PTRACE_TRACEME)          if (request == PTRACE_TRACEME)
506          {          {
507  --- linux-2.4.37.orig/arch/sh/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/sh/kernel/ptrace.c
508  +++ linux-2.4.37/arch/sh/kernel/ptrace.c  +++ linux-2.4.37.3/arch/sh/kernel/ptrace.c
509  @@ -26,6 +26,9 @@  @@ -26,6 +26,9 @@
510   #include <asm/system.h>   #include <asm/system.h>
511   #include <asm/processor.h>   #include <asm/processor.h>
# Line 526  Source code for this patch is http://www Line 527  Source code for this patch is http://www
527    
528          lock_kernel();          lock_kernel();
529          ret = -EPERM;          ret = -EPERM;
530  --- linux-2.4.37.orig/arch/sh64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/sh64/kernel/ptrace.c
531  +++ linux-2.4.37/arch/sh64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/sh64/kernel/ptrace.c
532  @@ -32,6 +32,9 @@  @@ -32,6 +32,9 @@
533   #include <asm/system.h>   #include <asm/system.h>
534   #include <asm/processor.h>   #include <asm/processor.h>
# Line 549  Source code for this patch is http://www Line 550  Source code for this patch is http://www
550    
551          lock_kernel();          lock_kernel();
552          ret = -EPERM;          ret = -EPERM;
553  --- linux-2.4.37.orig/arch/sparc/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/sparc/kernel/ptrace.c
554  +++ linux-2.4.37/arch/sparc/kernel/ptrace.c  +++ linux-2.4.37.3/arch/sparc/kernel/ptrace.c
555  @@ -21,6 +21,9 @@  @@ -21,6 +21,9 @@
556   #include <asm/pgtable.h>   #include <asm/pgtable.h>
557   #include <asm/system.h>   #include <asm/system.h>
# Line 574  Source code for this patch is http://www Line 575  Source code for this patch is http://www
575    
576          lock_kernel();          lock_kernel();
577   #ifdef DEBUG_PTRACE   #ifdef DEBUG_PTRACE
578  --- linux-2.4.37.orig/arch/sparc64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/sparc64/kernel/ptrace.c
579  +++ linux-2.4.37/arch/sparc64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/sparc64/kernel/ptrace.c
580  @@ -26,6 +26,9 @@  @@ -26,6 +26,9 @@
581   #include <asm/psrcompat.h>   #include <asm/psrcompat.h>
582   #include <asm/visasm.h>   #include <asm/visasm.h>
# Line 599  Source code for this patch is http://www Line 600  Source code for this patch is http://www
600    
601          if (current->thread.flags & SPARC_FLAG_32BIT) {          if (current->thread.flags & SPARC_FLAG_32BIT) {
602                  addr &= 0xffffffffUL;                  addr &= 0xffffffffUL;
603  --- linux-2.4.37.orig/arch/x86_64/ia32/ptrace32.c  --- linux-2.4.37.3.orig/arch/x86_64/ia32/ptrace32.c
604  +++ linux-2.4.37/arch/x86_64/ia32/ptrace32.c  +++ linux-2.4.37.3/arch/x86_64/ia32/ptrace32.c
605  @@ -24,6 +24,9 @@  @@ -24,6 +24,9 @@
606   #include <asm/i387.h>   #include <asm/i387.h>
607   #include <asm/fpu32.h>   #include <asm/fpu32.h>
# Line 622  Source code for this patch is http://www Line 623  Source code for this patch is http://www
623    
624          switch (request) {          switch (request) {
625          case PTRACE_TRACEME:          case PTRACE_TRACEME:
626  --- linux-2.4.37.orig/arch/x86_64/kernel/ptrace.c  --- linux-2.4.37.3.orig/arch/x86_64/kernel/ptrace.c
627  +++ linux-2.4.37/arch/x86_64/kernel/ptrace.c  +++ linux-2.4.37.3/arch/x86_64/kernel/ptrace.c
628  @@ -22,6 +22,9 @@  @@ -22,6 +22,9 @@
629   #include <asm/processor.h>   #include <asm/processor.h>
630   #include <asm/i387.h>   #include <asm/i387.h>
# Line 645  Source code for this patch is http://www Line 646  Source code for this patch is http://www
646    
647          /* This lock_kernel fixes a subtle race with suid exec */          /* This lock_kernel fixes a subtle race with suid exec */
648          lock_kernel();          lock_kernel();
649  --- linux-2.4.37.orig/fs/Config.in  --- linux-2.4.37.3.orig/fs/Config.in
650  +++ linux-2.4.37/fs/Config.in  +++ linux-2.4.37.3/fs/Config.in
651  @@ -176,4 +176,7 @@ comment 'Partition Types'  @@ -176,4 +176,7 @@ comment 'Partition Types'
652   source fs/partitions/Config.in   source fs/partitions/Config.in
653   endmenu   endmenu
# Line 655  Source code for this patch is http://www Line 656  Source code for this patch is http://www
656  +source fs/Config.ccs.in  +source fs/Config.ccs.in
657  +  +
658   endmenu   endmenu
659  --- linux-2.4.37.orig/fs/Makefile  --- linux-2.4.37.3.orig/fs/Makefile
660  +++ linux-2.4.37/fs/Makefile  +++ linux-2.4.37.3/fs/Makefile
661  @@ -80,5 +80,5 @@ obj-$(CONFIG_BINFMT_ELF)      += binfmt_elf.o  @@ -80,5 +80,5 @@ obj-$(CONFIG_BINFMT_ELF)      += binfmt_elf.o
662   # persistent filesystems   # persistent filesystems
663   obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))   obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
# Line 664  Source code for this patch is http://www Line 665  Source code for this patch is http://www
665  -  -
666  +include Makefile-2.4.ccs  +include Makefile-2.4.ccs
667   include $(TOPDIR)/Rules.make   include $(TOPDIR)/Rules.make
668  --- linux-2.4.37.orig/fs/attr.c  --- linux-2.4.37.3.orig/fs/attr.c
669  +++ linux-2.4.37/fs/attr.c  +++ linux-2.4.37.3/fs/attr.c
670  @@ -12,6 +12,9 @@  @@ -12,6 +12,9 @@
671   #include <linux/dnotify.h>   #include <linux/dnotify.h>
672   #include <linux/fcntl.h>   #include <linux/fcntl.h>
# Line 690  Source code for this patch is http://www Line 691  Source code for this patch is http://www
691    
692          lock_kernel();          lock_kernel();
693          if (inode->i_op && inode->i_op->setattr)          if (inode->i_op && inode->i_op->setattr)
694  --- linux-2.4.37.orig/fs/exec.c  --- linux-2.4.37.3.orig/fs/exec.c
695  +++ linux-2.4.37/fs/exec.c  +++ linux-2.4.37.3/fs/exec.c
696  @@ -48,6 +48,10 @@  @@ -48,6 +48,10 @@
697   #include <linux/kmod.h>   #include <linux/kmod.h>
698   #endif   #endif
# Line 703  Source code for this patch is http://www Line 704  Source code for this patch is http://www
704   int core_uses_pid;   int core_uses_pid;
705   char core_pattern[65] = "core";   char core_pattern[65] = "core";
706   int core_setuid_ok = 0;   int core_setuid_ok = 0;
707  @@ -125,6 +129,13 @@ asmlinkage long sys_uselib(const char *  @@ -125,6 +129,12 @@ asmlinkage long sys_uselib(const char *
708          if (error)          if (error)
709                  goto exit;                  goto exit;
710    
711  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
712  +       /* 01 means "read". */  +       error = ccs_check_uselib_permission(nd.dentry, nd.mnt);
 +       error = ccs_check_open_permission(nd.dentry, nd.mnt, 01);  
713  +       if (error)  +       if (error)
714  +               goto exit;  +               goto exit;
715  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
# Line 717  Source code for this patch is http://www Line 717  Source code for this patch is http://www
717          file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);          file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
718          error = PTR_ERR(file);          error = PTR_ERR(file);
719          if (IS_ERR(file))          if (IS_ERR(file))
720  @@ -389,6 +400,13 @@ struct file *open_exec(const char *name)  @@ -389,6 +399,11 @@ struct file *open_exec(const char *name)
721                          int err = permission(inode, MAY_EXEC);                          int err = permission(inode, MAY_EXEC);
722                          if (!err && !(inode->i_mode & 0111))                          if (!err && !(inode->i_mode & 0111))
723                                  err = -EACCES;                                  err = -EACCES;
724  +                       /***** TOMOYO Linux start. *****/  +                       /***** TOMOYO Linux start. *****/
725  +                       if (!err && (current->ccs_flags &  +                       if (!err)
726  +                                    CCS_CHECK_READ_FOR_OPEN_EXEC))  +                               err = ccs_check_open_exec_permission(nd.dentry,
727  +                               /* 01 means "read". */  +                                                                    nd.mnt);
 +                               err = ccs_check_open_permission(nd.dentry,  
 +                                                               nd.mnt, 01);  
728  +                       /***** TOMOYO Linux end. *****/  +                       /***** TOMOYO Linux end. *****/
729                          file = ERR_PTR(err);                          file = ERR_PTR(err);
730                          if (!err) {                          if (!err) {
731                                  file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);                                  file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
732  @@ -986,7 +1004,8 @@ int do_execve(char * filename, char ** a  @@ -986,7 +1001,8 @@ int do_execve(char * filename, char ** a
733          if (retval < 0)          if (retval < 0)
734                  goto out;                  goto out;
735    
736  -       retval = search_binary_handler(&bprm,regs);  -       retval = search_binary_handler(&bprm,regs);
737  +       retval = search_binary_handler_with_transition(&bprm, regs);  +       retval = ccs_search_binary_handler(&bprm, regs);
738  +  +
739          if (retval >= 0)          if (retval >= 0)
740                  /* execve success */                  /* execve success */
741                  return retval;                  return retval;
742  --- linux-2.4.37.orig/fs/fcntl.c  --- linux-2.4.37.3.orig/fs/fcntl.c
743  +++ linux-2.4.37/fs/fcntl.c  +++ linux-2.4.37.3/fs/fcntl.c
744  @@ -16,6 +16,9 @@  @@ -16,6 +16,9 @@
745   #include <asm/poll.h>   #include <asm/poll.h>
746   #include <asm/siginfo.h>   #include <asm/siginfo.h>
# Line 765  Source code for this patch is http://www Line 763  Source code for this patch is http://www
763          /* Did FASYNC state change? */          /* Did FASYNC state change? */
764          if ((arg ^ filp->f_flags) & FASYNC) {          if ((arg ^ filp->f_flags) & FASYNC) {
765                  if (filp->f_op && filp->f_op->fasync) {                  if (filp->f_op && filp->f_op->fasync) {
766  --- linux-2.4.37.orig/fs/ioctl.c  --- linux-2.4.37.3.orig/fs/ioctl.c
767  +++ linux-2.4.37/fs/ioctl.c  +++ linux-2.4.37.3/fs/ioctl.c
768  @@ -10,6 +10,9 @@  @@ -10,6 +10,9 @@
769    
770   #include <asm/uaccess.h>   #include <asm/uaccess.h>
# Line 804  Source code for this patch is http://www Line 802  Source code for this patch is http://www
802                          error = -ENOTTY;                          error = -ENOTTY;
803                          if (S_ISREG(filp->f_dentry->d_inode->i_mode))                          if (S_ISREG(filp->f_dentry->d_inode->i_mode))
804                                  error = file_ioctl(filp, cmd, arg);                                  error = file_ioctl(filp, cmd, arg);
805  --- linux-2.4.37.orig/fs/namei.c  --- linux-2.4.37.3.orig/fs/namei.c
806  +++ linux-2.4.37/fs/namei.c  +++ linux-2.4.37.3/fs/namei.c
807  @@ -28,6 +28,11 @@  @@ -28,6 +28,11 @@
808    
809   #define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE])   #define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE])
# Line 974  Source code for this patch is http://www Line 972  Source code for this patch is http://www
972          dput(new_dentry);          dput(new_dentry);
973   exit4:   exit4:
974          dput(old_dentry);          dput(old_dentry);
975  --- linux-2.4.37.orig/fs/namespace.c  --- linux-2.4.37.3.orig/fs/namespace.c
976  +++ linux-2.4.37/fs/namespace.c  +++ linux-2.4.37.3/fs/namespace.c
977  @@ -21,6 +21,13 @@  @@ -21,6 +21,13 @@
978   #include <linux/seq_file.h>   #include <linux/seq_file.h>
979   #include <linux/namespace.h>   #include <linux/namespace.h>
# Line 1104  Source code for this patch is http://www Line 1102  Source code for this patch is http://www
1102          read_lock(&current->fs->lock);          read_lock(&current->fs->lock);
1103          user_nd.mnt = mntget(current->fs->rootmnt);          user_nd.mnt = mntget(current->fs->rootmnt);
1104          user_nd.dentry = dget(current->fs->root);          user_nd.dentry = dget(current->fs->root);
1105  --- linux-2.4.37.orig/fs/open.c  --- linux-2.4.37.3.orig/fs/open.c
1106  +++ linux-2.4.37/fs/open.c  +++ linux-2.4.37.3/fs/open.c
1107  @@ -20,6 +20,13 @@  @@ -20,6 +20,13 @@
1108    
1109   #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))   #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
# Line 1171  Source code for this patch is http://www Line 1169  Source code for this patch is http://www
1169          if (capable(CAP_SYS_TTY_CONFIG)) {          if (capable(CAP_SYS_TTY_CONFIG)) {
1170                  tty_vhangup(current->tty);                  tty_vhangup(current->tty);
1171                  return 0;                  return 0;
1172  --- linux-2.4.37.orig/fs/proc/Makefile  --- linux-2.4.37.3.orig/fs/proc/Makefile
1173  +++ linux-2.4.37/fs/proc/Makefile  +++ linux-2.4.37.3/fs/proc/Makefile
1174  @@ -18,4 +18,8 @@ ifeq ($(CONFIG_PROC_DEVICETREE),y)  @@ -18,4 +18,8 @@ ifeq ($(CONFIG_PROC_DEVICETREE),y)
1175   obj-y += proc_devtree.o   obj-y += proc_devtree.o
1176   endif   endif
# Line 1182  Source code for this patch is http://www Line 1180  Source code for this patch is http://www
1180  +obj-$(CONFIG_TOMOYO) += ccs_proc.o  +obj-$(CONFIG_TOMOYO) += ccs_proc.o
1181  +  +
1182   include $(TOPDIR)/Rules.make   include $(TOPDIR)/Rules.make
1183  --- linux-2.4.37.orig/fs/proc/proc_misc.c  --- linux-2.4.37.3.orig/fs/proc/proc_misc.c
1184  +++ linux-2.4.37/fs/proc/proc_misc.c  +++ linux-2.4.37.3/fs/proc/proc_misc.c
1185  @@ -670,4 +670,9 @@ void __init proc_misc_init(void)  @@ -670,4 +670,9 @@ void __init proc_misc_init(void)
1186                          entry->proc_fops = &ppc_htab_operations;                          entry->proc_fops = &ppc_htab_operations;
1187          }          }
1188   #endif   #endif
1189  +       /***** CCS start. *****/  +       /***** CCS start. *****/
1190  +#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO)  +#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO)
1191  +       printk(KERN_INFO "Hook version: 2.4.37 2009/03/18\n");  +       printk(KERN_INFO "Hook version: 2.4.37.3 2009/07/20\n");
1192  +#endif  +#endif
1193  +       /***** CCS end. *****/  +       /***** CCS end. *****/
1194   }   }
1195  --- linux-2.4.37.orig/include/linux/sched.h  --- linux-2.4.37.3.orig/include/linux/sched.h
1196  +++ linux-2.4.37/include/linux/sched.h  +++ linux-2.4.37.3/include/linux/sched.h
1197  @@ -29,6 +29,10 @@ extern unsigned long event;  @@ -29,6 +29,10 @@ extern unsigned long event;
1198    
1199   struct exec_domain;   struct exec_domain;
# Line 1229  Source code for this patch is http://www Line 1227  Source code for this patch is http://www
1227   }   }
1228    
1229    
1230  --- linux-2.4.37.orig/kernel/kmod.c  --- linux-2.4.37.3.orig/kernel/kmod.c
1231  +++ linux-2.4.37/kernel/kmod.c  +++ linux-2.4.37.3/kernel/kmod.c
1232  @@ -134,6 +134,11 @@ int exec_usermodehelper(char *program_pa  @@ -134,6 +134,11 @@ int exec_usermodehelper(char *program_pa
1233          /* Allow execve args to be in kernel space. */          /* Allow execve args to be in kernel space. */
1234          set_fs(KERNEL_DS);          set_fs(KERNEL_DS);
# Line 1243  Source code for this patch is http://www Line 1241  Source code for this patch is http://www
1241          /* Go, go, go... */          /* Go, go, go... */
1242          if (execve(program_path, argv, envp) < 0)          if (execve(program_path, argv, envp) < 0)
1243                  return -errno;                  return -errno;
1244  --- linux-2.4.37.orig/kernel/module.c  --- linux-2.4.37.3.orig/kernel/module.c
1245  +++ linux-2.4.37/kernel/module.c  +++ linux-2.4.37.3/kernel/module.c
1246  @@ -10,6 +10,9 @@  @@ -10,6 +10,9 @@
1247   #include <linux/slab.h>   #include <linux/slab.h>
1248   #include <linux/kmod.h>   #include <linux/kmod.h>
# Line 1288  Source code for this patch is http://www Line 1286  Source code for this patch is http://www
1286    
1287          lock_kernel();          lock_kernel();
1288          if (name_user) {          if (name_user) {
1289  --- linux-2.4.37.orig/kernel/sched.c  --- linux-2.4.37.3.orig/kernel/sched.c
1290  +++ linux-2.4.37/kernel/sched.c  +++ linux-2.4.37.3/kernel/sched.c
1291  @@ -32,6 +32,9 @@  @@ -32,6 +32,9 @@
1292    
1293   #include <asm/uaccess.h>   #include <asm/uaccess.h>
# Line 1311  Source code for this patch is http://www Line 1309  Source code for this patch is http://www
1309    
1310          /*          /*
1311           *      Setpriority might change our priority at the same moment.           *      Setpriority might change our priority at the same moment.
1312  --- linux-2.4.37.orig/kernel/signal.c  --- linux-2.4.37.3.orig/kernel/signal.c
1313  +++ linux-2.4.37/kernel/signal.c  +++ linux-2.4.37.3/kernel/signal.c
1314  @@ -15,6 +15,9 @@  @@ -15,6 +15,9 @@
1315   #include <linux/sched.h>   #include <linux/sched.h>
1316    
# Line 1349  Source code for this patch is http://www Line 1347  Source code for this patch is http://www
1347          info.si_signo = sig;          info.si_signo = sig;
1348          info.si_errno = 0;          info.si_errno = 0;
1349          info.si_code = SI_TKILL;          info.si_code = SI_TKILL;
1350  --- linux-2.4.37.orig/kernel/sys.c  --- linux-2.4.37.3.orig/kernel/sys.c
1351  +++ linux-2.4.37/kernel/sys.c  +++ linux-2.4.37.3/kernel/sys.c
1352  @@ -17,6 +17,9 @@  @@ -17,6 +17,9 @@
1353    
1354   #include <asm/uaccess.h>   #include <asm/uaccess.h>
# Line 1405  Source code for this patch is http://www Line 1403  Source code for this patch is http://www
1403    
1404          down_write(&uts_sem);          down_write(&uts_sem);
1405          errno = -EFAULT;          errno = -EFAULT;
1406  --- linux-2.4.37.orig/kernel/sysctl.c  --- linux-2.4.37.3.orig/kernel/sysctl.c
1407  +++ linux-2.4.37/kernel/sysctl.c  +++ linux-2.4.37.3/kernel/sysctl.c
1408  @@ -33,6 +33,9 @@  @@ -33,6 +33,9 @@
1409   #include <linux/swap.h>   #include <linux/swap.h>
1410    
# Line 1454  Source code for this patch is http://www Line 1452  Source code for this patch is http://www
1452   }   }
1453    
1454   /*   /*
1455  --- linux-2.4.37.orig/kernel/time.c  --- linux-2.4.37.3.orig/kernel/time.c
1456  +++ linux-2.4.37/kernel/time.c  +++ linux-2.4.37.3/kernel/time.c
1457  @@ -29,6 +29,9 @@  @@ -29,6 +29,9 @@
1458   #include <linux/smp_lock.h>   #include <linux/smp_lock.h>
1459    
# Line 1499  Source code for this patch is http://www Line 1497  Source code for this patch is http://www
1497                                    
1498          /* Now we validate the data before disabling interrupts */          /* Now we validate the data before disabling interrupts */
1499    
1500  --- linux-2.4.37.orig/net/core/datagram.c  --- linux-2.4.37.3.orig/net/ipv4/raw.c
1501  +++ linux-2.4.37/net/core/datagram.c  +++ linux-2.4.37.3/net/ipv4/raw.c
1502  @@ -43,6 +43,10 @@  @@ -64,6 +64,9 @@
1503   #include <net/sock.h>   #include <net/raw.h>
1504     #include <net/inet_common.h>
1505   #include <net/checksum.h>   #include <net/checksum.h>
   
1506  +/***** TOMOYO Linux start. *****/  +/***** TOMOYO Linux start. *****/
 +#include <linux/tomoyo.h>  
1507  +#include <linux/tomoyo_socket.h>  +#include <linux/tomoyo_socket.h>
1508  +/***** TOMOYO Linux end. *****/  +/***** TOMOYO Linux end. *****/
1509    
1510   /*   struct sock *raw_v4_htable[RAWV4_HTABLE_SIZE];
1511    *     Is a socket 'connection oriented' ?   rwlock_t raw_v4_lock = RW_LOCK_UNLOCKED;
1512  @@ -164,6 +168,12 @@ struct sk_buff *skb_recv_datagram(struct  @@ -503,6 +506,11 @@ int raw_recvmsg(struct sock *sk, struct
1513                  } else          skb = skb_recv_datagram(sk, flags, noblock, &err);
1514                          skb = skb_dequeue(&sk->receive_queue);          if (!skb)
1515                    goto out;
1516  +               /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
1517  +               error = ccs_socket_recv_datagram_permission(sk, skb, flags);  +       err = ccs_socket_recvmsg_permission(sk, skb, flags);
1518  +               if (error)  +       if (err)
1519  +                       goto no_packet;  +               goto out;
1520  +               /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
 +  
                 if (skb)  
                         return skb;  
1521    
1522  --- linux-2.4.37.orig/net/ipv4/tcp_ipv4.c          copied = skb->len;
1523  +++ linux-2.4.37/net/ipv4/tcp_ipv4.c          if (len < copied) {
1524    --- linux-2.4.37.3.orig/net/ipv4/tcp_ipv4.c
1525    +++ linux-2.4.37.3/net/ipv4/tcp_ipv4.c
1526  @@ -67,6 +67,9 @@  @@ -67,6 +67,9 @@
1527   #include <linux/inet.h>   #include <linux/inet.h>
1528   #include <linux/stddef.h>   #include <linux/stddef.h>
# Line 1559  Source code for this patch is http://www Line 1555  Source code for this patch is http://www
1555    
1556                          /* Does not bother with rcv_saddr checks,                          /* Does not bother with rcv_saddr checks,
1557                           * because the established check is already                           * because the established check is already
1558  --- linux-2.4.37.orig/net/ipv4/udp.c  --- linux-2.4.37.3.orig/net/ipv4/udp.c
1559  +++ linux-2.4.37/net/ipv4/udp.c  +++ linux-2.4.37.3/net/ipv4/udp.c
1560  @@ -97,6 +97,9 @@  @@ -97,6 +97,12 @@
1561   #include <net/route.h>   #include <net/route.h>
1562   #include <net/inet_common.h>   #include <net/inet_common.h>
1563   #include <net/checksum.h>   #include <net/checksum.h>
1564  +/***** SAKURA Linux start. *****/  +/***** SAKURA Linux start. *****/
1565  +#include <linux/sakura.h>  +#include <linux/sakura.h>
1566  +/***** SAKURA Linux end. *****/  +/***** SAKURA Linux end. *****/
1567    +/***** TOMOYO Linux start. *****/
1568    +#include <linux/tomoyo_socket.h>
1569    +/***** TOMOYO Linux end. *****/
1570    
1571   /*   /*
1572    *     Snmp MIB for the UDP layer    *     Snmp MIB for the UDP layer
1573  @@ -131,6 +134,10 @@ static int udp_v4_get_port(struct sock *  @@ -131,6 +137,10 @@ static int udp_v4_get_port(struct sock *
1574                                          result = sysctl_local_port_range[0] +                                          result = sysctl_local_port_range[0] +
1575                                                  ((result - sysctl_local_port_range[0]) &                                                  ((result - sysctl_local_port_range[0]) &
1576                                                   (UDP_HTABLE_SIZE - 1));                                                   (UDP_HTABLE_SIZE - 1));
# Line 1582  Source code for this patch is http://www Line 1581  Source code for this patch is http://www
1581                                  goto gotit;                                  goto gotit;
1582                          }                          }
1583                          size = 0;                          size = 0;
1584  @@ -148,6 +155,10 @@ static int udp_v4_get_port(struct sock *  @@ -148,6 +158,10 @@ static int udp_v4_get_port(struct sock *
1585                                  result = sysctl_local_port_range[0]                                  result = sysctl_local_port_range[0]
1586                                          + ((result - sysctl_local_port_range[0]) &                                          + ((result - sysctl_local_port_range[0]) &
1587                                             (UDP_HTABLE_SIZE - 1));                                             (UDP_HTABLE_SIZE - 1));
# Line 1593  Source code for this patch is http://www Line 1592  Source code for this patch is http://www
1592                          if (!udp_lport_inuse(result))                          if (!udp_lport_inuse(result))
1593                                  break;                                  break;
1594                  }                  }
1595  --- linux-2.4.37.orig/net/ipv6/tcp_ipv6.c  @@ -711,6 +725,11 @@ try_again:
1596  +++ linux-2.4.37/net/ipv6/tcp_ipv6.c          skb = skb_recv_datagram(sk, flags, noblock, &err);
1597            if (!skb)
1598                    goto out;
1599    +       /***** TOMOYO Linux start. *****/
1600    +       err = ccs_socket_recvmsg_permission(sk, skb, flags);
1601    +       if (err)
1602    +               goto out;
1603    +       /***** TOMOYO Linux end. *****/
1604      
1605            copied = skb->len - sizeof(struct udphdr);
1606            if (copied > len) {
1607    --- linux-2.4.37.3.orig/net/ipv6/raw.c
1608    +++ linux-2.4.37.3/net/ipv6/raw.c
1609    @@ -45,6 +45,9 @@
1610     #include <net/inet_common.h>
1611    
1612     #include <net/rawv6.h>
1613    +/***** TOMOYO Linux start. *****/
1614    +#include <linux/tomoyo_socket.h>
1615    +/***** TOMOYO Linux end. *****/
1616    
1617     struct sock *raw_v6_htable[RAWV6_HTABLE_SIZE];
1618     rwlock_t raw_v6_lock = RW_LOCK_UNLOCKED;
1619    @@ -369,6 +372,11 @@ int rawv6_recvmsg(struct sock *sk, struc
1620            skb = skb_recv_datagram(sk, flags, noblock, &err);
1621            if (!skb)
1622                    goto out;
1623    +       /***** TOMOYO Linux start. *****/
1624    +       err = ccs_socket_recvmsg_permission(sk, skb, flags);
1625    +       if (err)
1626    +               goto out;
1627    +       /***** TOMOYO Linux end. *****/
1628    
1629            copied = skb->len;
1630            if (copied > len) {
1631    --- linux-2.4.37.3.orig/net/ipv6/tcp_ipv6.c
1632    +++ linux-2.4.37.3/net/ipv6/tcp_ipv6.c
1633  @@ -52,6 +52,9 @@  @@ -52,6 +52,9 @@
1634   #include <net/inet_ecn.h>   #include <net/inet_ecn.h>
1635    
# Line 1616  Source code for this patch is http://www Line 1651  Source code for this patch is http://www
1651                          for (tb = head->chain; tb; tb = tb->next)                          for (tb = head->chain; tb; tb = tb->next)
1652                                  if (tb->port == rover)                                  if (tb->port == rover)
1653                                          goto next;                                          goto next;
1654  --- linux-2.4.37.orig/net/ipv6/udp.c  --- linux-2.4.37.3.orig/net/ipv6/udp.c
1655  +++ linux-2.4.37/net/ipv6/udp.c  +++ linux-2.4.37.3/net/ipv6/udp.c
1656  @@ -50,6 +50,9 @@  @@ -50,6 +50,12 @@
1657   #include <net/inet_common.h>   #include <net/inet_common.h>
1658    
1659   #include <net/checksum.h>   #include <net/checksum.h>
1660  +/***** SAKURA Linux start. *****/  +/***** SAKURA Linux start. *****/
1661  +#include <linux/sakura.h>  +#include <linux/sakura.h>
1662  +/***** SAKURA Linux end. *****/  +/***** SAKURA Linux end. *****/
1663    +/***** TOMOYO Linux start. *****/
1664    +#include <linux/tomoyo_socket.h>
1665    +/***** TOMOYO Linux end. *****/
1666    
1667   struct udp_mib udp_stats_in6[NR_CPUS*2];   struct udp_mib udp_stats_in6[NR_CPUS*2];
1668    
1669  @@ -77,6 +80,10 @@ static int udp_v6_get_port(struct sock *  @@ -77,6 +83,10 @@ static int udp_v6_get_port(struct sock *
1670                                          result = sysctl_local_port_range[0] +                                          result = sysctl_local_port_range[0] +
1671                                                  ((result - sysctl_local_port_range[0]) &                                                  ((result - sysctl_local_port_range[0]) &
1672                                                   (UDP_HTABLE_SIZE - 1));                                                   (UDP_HTABLE_SIZE - 1));
# Line 1639  Source code for this patch is http://www Line 1677  Source code for this patch is http://www
1677                                  goto gotit;                                  goto gotit;
1678                          }                          }
1679                          size = 0;                          size = 0;
1680  @@ -94,6 +101,10 @@ static int udp_v6_get_port(struct sock *  @@ -94,6 +104,10 @@ static int udp_v6_get_port(struct sock *
1681                                  result = sysctl_local_port_range[0]                                  result = sysctl_local_port_range[0]
1682                                          + ((result - sysctl_local_port_range[0]) &                                          + ((result - sysctl_local_port_range[0]) &
1683                                             (UDP_HTABLE_SIZE - 1));                                             (UDP_HTABLE_SIZE - 1));
# Line 1650  Source code for this patch is http://www Line 1688  Source code for this patch is http://www
1688                          if (!udp_lport_inuse(result))                          if (!udp_lport_inuse(result))
1689                                  break;                                  break;
1690                  }                  }
1691  --- linux-2.4.37.orig/net/socket.c  @@ -406,6 +420,11 @@ try_again:
1692  +++ linux-2.4.37/net/socket.c          skb = skb_recv_datagram(sk, flags, noblock, &err);
1693            if (!skb)
1694                    goto out;
1695    +       /***** TOMOYO Linux start. *****/
1696    +       err = ccs_socket_recvmsg_permission(sk, skb, flags);
1697    +       if (err)
1698    +               goto out;
1699    +       /***** TOMOYO Linux end. *****/
1700    
1701            copied = skb->len - sizeof(struct udphdr);
1702            if (copied > len) {
1703    --- linux-2.4.37.3.orig/net/socket.c
1704    +++ linux-2.4.37.3/net/socket.c
1705  @@ -84,6 +84,10 @@  @@ -84,6 +84,10 @@
1706   #include <net/sock.h>   #include <net/sock.h>
1707   #include <net/scm.h>   #include <net/scm.h>
# Line 1741  Source code for this patch is http://www Line 1791  Source code for this patch is http://www
1791          err = sock->ops->connect(sock, (struct sockaddr *) address, addrlen,          err = sock->ops->connect(sock, (struct sockaddr *) address, addrlen,
1792                                   sock->file->f_flags);                                   sock->file->f_flags);
1793   out_put:   out_put:
1794  --- linux-2.4.37.orig/net/unix/af_unix.c  --- linux-2.4.37.3.orig/net/unix/af_unix.c
1795  +++ linux-2.4.37/net/unix/af_unix.c  +++ linux-2.4.37.3/net/unix/af_unix.c
1796  @@ -111,6 +111,9 @@  @@ -111,6 +111,9 @@
1797   #include <linux/rtnetlink.h>   #include <linux/rtnetlink.h>
1798    
# Line 1753  Source code for this patch is http://www Line 1803  Source code for this patch is http://www
1803    
1804   int sysctl_unix_max_dgram_qlen = 10;   int sysctl_unix_max_dgram_qlen = 10;
1805    
1806  @@ -709,6 +712,11 @@ static int unix_bind(struct socket *sock  @@ -710,6 +713,11 @@ static int unix_bind(struct socket *sock
1807                   * All right, let's create it.                   * All right, let's create it.
1808                   */                   */
1809                  mode = S_IFSOCK | (sock->inode->i_mode & ~current->fs->umask);                  mode = S_IFSOCK | (sock->inode->i_mode & ~current->fs->umask);

Legend:
Removed from v.2299  
changed lines
  Added in v.2781

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26