Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c57baf1e1e24b004b57d282267542baab802753c
Commit:     c57baf1e1e24b004b57d282267542baab802753c
Parent:     2aa44d0567ed21b47b87d68819415d48194cb923
Author:     Eric W. Biederman <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 23 15:18:02 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Aug 23 15:18:02 2007 +0200

    sched: fix sysctl directory permissions
    
    There are two remaining gotchas:
    
    - The directories have impossible permissions (writeable).
    
    - The ctl_name for the kernel directory is inconsistent with
      everything else.  It should be CTL_KERN.
    
    Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 48e7586..5fecbbb 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5257,15 +5257,16 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
 static struct ctl_table sd_ctl_dir[] = {
        {
                .procname       = "sched_domain",
-               .mode           = 0755,
+               .mode           = 0555,
        },
        {0,},
 };
 
 static struct ctl_table sd_ctl_root[] = {
        {
+               .ctl_name       = CTL_KERN,
                .procname       = "kernel",
-               .mode           = 0755,
+               .mode           = 0555,
                .child          = sd_ctl_dir,
        },
        {0,},
@@ -5341,7 +5342,7 @@ static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
        for_each_domain(cpu, sd) {
                snprintf(buf, 32, "domain%d", i);
                entry->procname = kstrdup(buf, GFP_KERNEL);
-               entry->mode = 0755;
+               entry->mode = 0555;
                entry->child = sd_alloc_ctl_domain_table(sd);
                entry++;
                i++;
@@ -5361,7 +5362,7 @@ static void init_sched_domain_sysctl(void)
        for (i = 0; i < cpu_num; i++, entry++) {
                snprintf(buf, 32, "cpu%d", i);
                entry->procname = kstrdup(buf, GFP_KERNEL);
-               entry->mode = 0755;
+               entry->mode = 0555;
                entry->child = sd_alloc_ctl_cpu_table(i);
        }
        sd_sysctl_header = register_sysctl_table(sd_ctl_root);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to