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

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.25-suse-11.0.diff

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

revision 2091 by kumaneko, Thu Jan 29 09:56:56 2009 UTC revision 2278 by kumaneko, Wed Mar 18 08:12:58 2009 UTC
# Line 2  This is TOMOYO Linux patch for openSUSE Line 2  This is TOMOYO Linux patch for openSUSE
2    
3  Source code for this patch is http://download.opensuse.org/update/11.0/rpm/i586/kernel-source-2.6.25.20-0.1.i586.rpm  Source code for this patch is http://download.opensuse.org/update/11.0/rpm/i586/kernel-source-2.6.25.20-0.1.i586.rpm
4  ---  ---
5   arch/ia64/ia32/sys_ia32.c       |    9 ++   arch/ia64/ia32/sys_ia32.c       |    7 ++
6   arch/mips/kernel/ptrace32.c     |    9 ++   arch/mips/kernel/ptrace32.c     |    7 ++
7   arch/s390/kernel/ptrace.c       |    9 ++   arch/s390/kernel/ptrace.c       |    7 ++
8   arch/x86/kernel/ptrace.c        |    9 ++   arch/x86/kernel/ptrace.c        |    7 ++
9   fs/Kconfig                      |    2   fs/Kconfig                      |    2
10   fs/Makefile                     |    2   fs/Makefile                     |    2
11   fs/attr.c                       |   19 ++++++   fs/attr.c                       |   19 ++++++
# Line 25  Source code for this patch is http://dow Line 25  Source code for this patch is http://dow
25   kernel/kexec.c                  |    7 ++   kernel/kexec.c                  |    7 ++
26   kernel/kmod.c                   |    5 +   kernel/kmod.c                   |    5 +
27   kernel/module.c                 |   11 +++   kernel/module.c                 |   11 +++
28   kernel/ptrace.c                 |   15 ++++   kernel/ptrace.c                 |   11 +++
29   kernel/sched.c                  |    7 ++   kernel/sched.c                  |    7 ++
30   kernel/signal.c                 |   21 ++++++   kernel/signal.c                 |   21 ++++++
31   kernel/sys.c                    |   21 ++++++   kernel/sys.c                    |   21 ++++++
# Line 38  Source code for this patch is http://dow Line 38  Source code for this patch is http://dow
38   net/ipv4/udp.c                  |   10 +++   net/ipv4/udp.c                  |   10 +++
39   net/socket.c                    |   41 +++++++++++++   net/socket.c                    |   41 +++++++++++++
40   net/unix/af_unix.c              |   15 ++++   net/unix/af_unix.c              |   15 ++++
41   36 files changed, 626 insertions(+), 2 deletions(-)   36 files changed, 614 insertions(+), 2 deletions(-)
42    
43  --- linux-2.6.25.20-0.1.orig/arch/ia64/ia32/sys_ia32.c  --- linux-2.6.25.20-0.1.orig/arch/ia64/ia32/sys_ia32.c
44  +++ linux-2.6.25.20-0.1/arch/ia64/ia32/sys_ia32.c  +++ linux-2.6.25.20-0.1/arch/ia64/ia32/sys_ia32.c
# Line 52  Source code for this patch is http://dow Line 52  Source code for this patch is http://dow
52    
53   #include "ia32priv.h"   #include "ia32priv.h"
54    
55  @@ -1753,6 +1756,12 @@ sys32_ptrace (int request, pid_t pid, un  @@ -1753,6 +1756,10 @@ sys32_ptrace (int request, pid_t pid, un
56          struct task_struct *child;          struct task_struct *child;
57          unsigned int value, tmp;          unsigned int value, tmp;
58          long i, ret;          long i, ret;
59  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
60  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
61  +               return -EPERM;  +               return -EPERM;
 +#endif  
62  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
63    
64          lock_kernel();          lock_kernel();
# Line 77  Source code for this patch is http://dow Line 75  Source code for this patch is http://dow
75    
76   int ptrace_getregs(struct task_struct *child, __s64 __user *data);   int ptrace_getregs(struct task_struct *child, __s64 __user *data);
77   int ptrace_setregs(struct task_struct *child, __s64 __user *data);   int ptrace_setregs(struct task_struct *child, __s64 __user *data);
78  @@ -50,6 +53,12 @@ asmlinkage int sys32_ptrace(int request,  @@ -50,6 +53,10 @@ asmlinkage int sys32_ptrace(int request,
79   {   {
80          struct task_struct *child;          struct task_struct *child;
81          int ret;          int ret;
82  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
83  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
84  +               return -EPERM;  +               return -EPERM;
 +#endif  
85  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
86    
87   #if 0   #if 0
# Line 102  Source code for this patch is http://dow Line 98  Source code for this patch is http://dow
98    
99   #ifdef CONFIG_COMPAT   #ifdef CONFIG_COMPAT
100   #include "compat_ptrace.h"   #include "compat_ptrace.h"
101  @@ -698,6 +701,12 @@ sys_ptrace(long request, long pid, long  @@ -698,6 +701,10 @@ sys_ptrace(long request, long pid, long
102          struct task_struct *child;          struct task_struct *child;
103          int ret;          int ret;
104    
105  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
106  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
107  +               return -EPERM;  +               return -EPERM;
 +#endif  
108  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
109          lock_kernel();          lock_kernel();
110          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
# Line 127  Source code for this patch is http://dow Line 121  Source code for this patch is http://dow
121    
122   #include "tls.h"   #include "tls.h"
123    
124  @@ -1240,6 +1243,12 @@ asmlinkage long sys32_ptrace(long reques  @@ -1240,6 +1243,10 @@ asmlinkage long sys32_ptrace(long reques
125          void __user *datap = compat_ptr(data);          void __user *datap = compat_ptr(data);
126          int ret;          int ret;
127          __u32 val;          __u32 val;
128  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
129  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
130  +               return -EPERM;  +               return -EPERM;
 +#endif  
131  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
132    
133          switch (request) {          switch (request) {
# Line 928  Source code for this patch is http://dow Line 920  Source code for this patch is http://dow
920    
921   /*   /*
922    * ptrace a task: make the debugger its new parent and    * ptrace a task: make the debugger its new parent and
923  @@ -548,6 +551,12 @@ asmlinkage long sys_ptrace(long request,  @@ -548,6 +551,10 @@ asmlinkage long sys_ptrace(long request,
924          /*          /*
925           * This lock_kernel fixes a subtle race with suid exec           * This lock_kernel fixes a subtle race with suid exec
926           */           */
927  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
928  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
929  +               return -EPERM;  +               return -EPERM;
 +#endif  
930  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
931          lock_kernel();          lock_kernel();
932          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
933                  ret = ptrace_traceme();                  ret = ptrace_traceme();
934  @@ -655,6 +664,12 @@ asmlinkage long compat_sys_ptrace(compat  @@ -655,6 +662,10 @@ asmlinkage long compat_sys_ptrace(compat
935          /*          /*
936           * This lock_kernel fixes a subtle race with suid exec           * This lock_kernel fixes a subtle race with suid exec
937           */           */
938  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
 +#ifdef TOMOYO_SYS_PTRACE  
939  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))  +       if (!ccs_capable(TOMOYO_SYS_PTRACE))
940  +               return -EPERM;  +               return -EPERM;
 +#endif  
941  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
942          lock_kernel();          lock_kernel();
943          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {

Legend:
Removed from v.2091  
changed lines
  Added in v.2278

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