Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.35-fedora-14.diff

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

revision 5914 by kumaneko, Tue Nov 29 03:00:26 2011 UTC revision 5915 by kumaneko, Thu Mar 8 06:10:35 2012 UTC
# Line 13  Source code for this patch is http://ftp Line 13  Source code for this patch is http://ftp
13   kernel/fork.c             |    5 +   kernel/fork.c             |    5 +
14   kernel/kexec.c            |    3 +   kernel/kexec.c            |    3 +
15   kernel/module.c           |    5 +   kernel/module.c           |    5 +
16   kernel/ptrace.c           |    4 +   kernel/ptrace.c           |   10 +++
17   kernel/sched.c            |    2   kernel/sched.c            |    2
18   kernel/signal.c           |   10 +++   kernel/signal.c           |   10 +++
19   kernel/sys.c              |   10 +++   kernel/sys.c              |   10 +++
# Line 27  Source code for this patch is http://ftp Line 27  Source code for this patch is http://ftp
27   security/Kconfig          |    2   security/Kconfig          |    2
28   security/Makefile         |    3 +   security/Makefile         |    3 +
29   security/security.c       |  137 +++++++++++++++++++++++++++++++++++++---------   security/security.c       |  137 +++++++++++++++++++++++++++++++++++++---------
30   25 files changed, 242 insertions(+), 51 deletions(-)   25 files changed, 248 insertions(+), 51 deletions(-)
31    
32  --- linux-2.6.35.14-106.fc14.orig/fs/compat.c  --- linux-2.6.35.14-106.fc14.orig/fs/compat.c
33  +++ linux-2.6.35.14-106.fc14/fs/compat.c  +++ linux-2.6.35.14-106.fc14/fs/compat.c
# Line 71  Source code for this patch is http://ftp Line 71  Source code for this patch is http://ftp
71  +  +
72  +static int __init ccs_show_version(void)  +static int __init ccs_show_version(void)
73  +{  +{
74  +       printk(KERN_INFO "Hook version: 2.6.35.14-106.fc14 2011/11/29\n");  +       printk(KERN_INFO "Hook version: 2.6.35.14-106.fc14 2012/03/08\n");
75  +       return 0;  +       return 0;
76  +}  +}
77  +module_init(ccs_show_version);  +module_init(ccs_show_version);
# Line 411  Source code for this patch is http://ftp Line 411  Source code for this patch is http://ftp
411          mod = load_module(umod, len, uargs);          mod = load_module(umod, len, uargs);
412  --- linux-2.6.35.14-106.fc14.orig/kernel/ptrace.c  --- linux-2.6.35.14-106.fc14.orig/kernel/ptrace.c
413  +++ linux-2.6.35.14-106.fc14/kernel/ptrace.c  +++ linux-2.6.35.14-106.fc14/kernel/ptrace.c
414  @@ -235,6 +235,8 @@ SYSCALL_DEFINE4(ptrace, long, request, l  @@ -235,6 +235,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
415   {   {
416          struct task_struct *child;          struct task_struct *child;
417          long ret;          long ret;
418  +       if (ccs_ptrace_permission(request, pid))  +       {
419  +               return -EPERM;  +               const int rc = ccs_ptrace_permission(request, pid);
420    +               if (rc)
421    +                       return rc;
422    +       }
423    
424          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
425                  ret = ptrace_traceme();                  ret = ptrace_traceme();
426  @@ -299,6 +301,8 @@ asmlinkage long compat_sys_ptrace(compat  @@ -299,6 +304,11 @@ asmlinkage long compat_sys_ptrace(compat
427   {   {
428          struct task_struct *child;          struct task_struct *child;
429          long ret;          long ret;
430  +       if (ccs_ptrace_permission(request, pid))  +       {
431  +               return -EPERM;  +               const int rc = ccs_ptrace_permission(request, pid);
432    +               if (rc)
433    +                       return rc;
434    +       }
435    
436          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
437                  ret = ptrace_traceme();                  ret = ptrace_traceme();

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