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

Subversion リポジトリの参照

Diff of /trunk/1.7.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 2805 by kumaneko, Mon Jul 27 02:00:55 2009 UTC revision 2851 by kumaneko, Wed Aug 5 04:58:04 2009 UTC
# Line 27  Source code for this patch is http://dow Line 27  Source code for this patch is http://dow
27   kernel/module.c                 |    5 +++++   kernel/module.c                 |    5 +++++
28   kernel/ptrace.c                 |    5 +++++   kernel/ptrace.c                 |    5 +++++
29   kernel/sched.c                  |    3 +++   kernel/sched.c                  |    3 +++
30   kernel/signal.c                 |   13 +++++++++++++   kernel/signal.c                 |    7 +++++++
31   kernel/sys.c                    |   11 +++++++++++   kernel/sys.c                    |   11 +++++++++++
32   kernel/sysctl.c                 |    5 +++++   kernel/sysctl.c                 |    5 +++++
33   kernel/time.c                   |    5 +++++   kernel/time.c                   |    5 +++++
# Line 40  Source code for this patch is http://dow Line 40  Source code for this patch is http://dow
40   net/ipv6/udp.c                  |    4 ++++   net/ipv6/udp.c                  |    4 ++++
41   net/socket.c                    |   24 ++++++++++++++++++++++++   net/socket.c                    |   24 ++++++++++++++++++++++++
42   net/unix/af_unix.c              |    4 ++++   net/unix/af_unix.c              |    4 ++++
43   38 files changed, 252 insertions(+), 2 deletions(-)   38 files changed, 246 insertions(+), 2 deletions(-)
44    
45  --- linux-2.6.25.20-0.4.orig/arch/ia64/ia32/sys_ia32.c  --- linux-2.6.25.20-0.4.orig/arch/ia64/ia32/sys_ia32.c
46  +++ linux-2.6.25.20-0.4/arch/ia64/ia32/sys_ia32.c  +++ linux-2.6.25.20-0.4/arch/ia64/ia32/sys_ia32.c
# Line 577  Source code for this patch is http://dow Line 577  Source code for this patch is http://dow
577                          entry->proc_fops = &proc_sysrq_trigger_operations;                          entry->proc_fops = &proc_sysrq_trigger_operations;
578          }          }
579   #endif   #endif
580  +       printk(KERN_INFO "Hook version: 2.6.25.20-0.4 2009/07/23\n");  +       printk(KERN_INFO "Hook version: 2.6.25.20-0.4 2009/08/05\n");
581   }   }
582  --- linux-2.6.25.20-0.4.orig/include/linux/init_task.h  --- linux-2.6.25.20-0.4.orig/include/linux/init_task.h
583  +++ linux-2.6.25.20-0.4/include/linux/init_task.h  +++ linux-2.6.25.20-0.4/include/linux/init_task.h
# Line 745  Source code for this patch is http://dow Line 745  Source code for this patch is http://dow
745    
746   /*   /*
747    * SLAB caches for signal bits.    * SLAB caches for signal bits.
748  @@ -2232,6 +2233,10 @@ asmlinkage long  @@ -2232,6 +2233,8 @@ asmlinkage long
749   sys_kill(int pid, int sig)   sys_kill(int pid, int sig)
750   {   {
751          struct siginfo info;          struct siginfo info;
752  +       if (sig && !ccs_capable(CCS_SYS_KILL))  +       if (ccs_kill_permission(pid, sig))
 +               return -EPERM;  
 +       if (sig && ccs_check_signal_acl(sig, pid))  
753  +               return -EPERM;  +               return -EPERM;
754    
755          info.si_signo = sig;          info.si_signo = sig;
756          info.si_errno = 0;          info.si_errno = 0;
757  @@ -2290,6 +2295,10 @@ asmlinkage long sys_tgkill(int tgid, int  @@ -2290,6 +2293,8 @@ asmlinkage long sys_tgkill(int tgid, int
758          /* This is only valid for single tasks */          /* This is only valid for single tasks */
759          if (pid <= 0 || tgid <= 0)          if (pid <= 0 || tgid <= 0)
760                  return -EINVAL;                  return -EINVAL;
761  +       if (sig && !ccs_capable(CCS_SYS_KILL))  +       if (ccs_tgkill_permission(tgid, pid, sig))
 +               return -EPERM;  
 +       if (sig && ccs_check_signal_acl(sig, pid))  
762  +               return -EPERM;  +               return -EPERM;
763    
764          return do_tkill(tgid, pid, sig);          return do_tkill(tgid, pid, sig);
765   }   }
766  @@ -2303,6 +2312,10 @@ sys_tkill(int pid, int sig)  @@ -2303,6 +2308,8 @@ sys_tkill(int pid, int sig)
767          /* This is only valid for single tasks */          /* This is only valid for single tasks */
768          if (pid <= 0)          if (pid <= 0)
769                  return -EINVAL;                  return -EINVAL;
770  +       if (sig && !ccs_capable(CCS_SYS_KILL))  +       if (ccs_tkill_permission(pid, sig))
 +               return -EPERM;  
 +       if (sig && ccs_check_signal_acl(sig, pid))  
771  +               return -EPERM;  +               return -EPERM;
772    
773          return do_tkill(0, pid, sig);          return do_tkill(0, pid, sig);

Legend:
Removed from v.2805  
changed lines
  Added in v.2851

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