Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

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

revision 5914 by kumaneko, Thu Dec 22 01:19:04 2011 UTC revision 5915 by kumaneko, Thu Mar 8 06:10:35 2012 UTC
# Line 12  Source code for this patch is http://www Line 12  Source code for this patch is http://www
12   kernel/fork.c                   |    5 +   kernel/fork.c                   |    5 +
13   kernel/kexec.c                  |    3   kernel/kexec.c                  |    3
14   kernel/module.c                 |    5 +   kernel/module.c                 |    5 +
15   kernel/ptrace.c                 |    4 +   kernel/ptrace.c                 |   10 ++
16   kernel/sched.c                  |    2   kernel/sched.c                  |    2
17   kernel/signal.c                 |   10 ++   kernel/signal.c                 |   10 ++
18   kernel/sys.c                    |   10 ++   kernel/sys.c                    |   10 ++
# Line 28  Source code for this patch is http://www Line 28  Source code for this patch is http://www
28   security/Kconfig                |    2   security/Kconfig                |    2
29   security/Makefile               |    3   security/Makefile               |    3
30   security/security.c             |  137 ++++++++++++++++++++++++++++++++--------   security/security.c             |  137 ++++++++++++++++++++++++++++++++--------
31   26 files changed, 245 insertions(+), 51 deletions(-)   26 files changed, 251 insertions(+), 51 deletions(-)
32    
33  --- linux-2.6.34.10.orig/fs/compat.c  --- linux-2.6.34.10.orig/fs/compat.c
34  +++ linux-2.6.34.10/fs/compat.c  +++ linux-2.6.34.10/fs/compat.c
# Line 72  Source code for this patch is http://www Line 72  Source code for this patch is http://www
72  +  +
73  +static int __init ccs_show_version(void)  +static int __init ccs_show_version(void)
74  +{  +{
75  +       printk(KERN_INFO "Hook version: 2.6.34.10 2011/06/27\n");  +       printk(KERN_INFO "Hook version: 2.6.34.10 2012/03/08\n");
76  +       return 0;  +       return 0;
77  +}  +}
78  +module_init(ccs_show_version);  +module_init(ccs_show_version);
# Line 406  Source code for this patch is http://www Line 406  Source code for this patch is http://www
406          if (mutex_lock_interruptible(&module_mutex) != 0)          if (mutex_lock_interruptible(&module_mutex) != 0)
407  --- linux-2.6.34.10.orig/kernel/ptrace.c  --- linux-2.6.34.10.orig/kernel/ptrace.c
408  +++ linux-2.6.34.10/kernel/ptrace.c  +++ linux-2.6.34.10/kernel/ptrace.c
409  @@ -665,6 +665,8 @@ SYSCALL_DEFINE4(ptrace, long, request, l  @@ -665,6 +665,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
410   {   {
411          struct task_struct *child;          struct task_struct *child;
412          long ret;          long ret;
413  +       if (ccs_ptrace_permission(request, pid))  +       {
414  +               return -EPERM;  +               const int rc = ccs_ptrace_permission(request, pid);
415    +               if (rc)
416    +                       return rc;
417    +       }
418    
419          /*          /*
420           * This lock_kernel fixes a subtle race with suid exec           * This lock_kernel fixes a subtle race with suid exec
421  @@ -812,6 +814,8 @@ asmlinkage long compat_sys_ptrace(compat  @@ -812,6 +817,11 @@ asmlinkage long compat_sys_ptrace(compat
422   {   {
423          struct task_struct *child;          struct task_struct *child;
424          long ret;          long ret;
425  +       if (ccs_ptrace_permission(request, pid))  +       {
426  +               return -EPERM;  +               const int rc = ccs_ptrace_permission(request, pid);
427    +               if (rc)
428    +                       return rc;
429    +       }
430    
431          /*          /*
432           * This lock_kernel fixes a subtle race with suid exec           * This lock_kernel fixes a subtle race with suid exec

Legend:
Removed from v.5914  
changed lines
  Added in v.5915

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