[patch 5/8] s390: s390dbf permissions.

From: Michael Holzheu <[EMAIL PROTECTED]>

Use more specific permissions for the procfiles if s390dbf. Read only
views should have read permission, write only views should have write
permission.

Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>

diffstat:
 arch/s390/kernel/debug.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -urN linux-2.6/arch/s390/kernel/debug.c 
linux-2.6-patched/arch/s390/kernel/debug.c
--- linux-2.6/arch/s390/kernel/debug.c  2005-03-02 08:37:48.000000000 +0100
+++ linux-2.6-patched/arch/s390/kernel/debug.c  2005-03-17 15:36:00.000000000 
+0100
@@ -931,11 +931,15 @@
        int rc = 0;
        int i;
        unsigned long flags;
-       mode_t mode = S_IFREG | S_IRUSR | S_IWUSR;
+       mode_t mode = S_IFREG;
        struct proc_dir_entry *pde;
 
        if (!id)
                goto out;
+       if (view->prolog_proc || view->format_proc || view->header_proc)
+               mode |= S_IRUSR;
+       if (view->input_proc)
+               mode |= S_IWUSR;
        pde = create_proc_entry(view->name, mode, id->proc_root_entry);
        if (!pde){
                printk(KERN_WARNING "debug: create_proc_entry() failed! Cannot 
register view %s/%s\n", id->name,view->name);
@@ -958,10 +962,6 @@
        }
        else {
                id->views[i] = view;
-               if (view->prolog_proc || view->format_proc || view->header_proc)
-                       mode |= S_IRUSR;
-               if (view->input_proc)
-                       mode |= S_IWUSR;
                pde->proc_fops = &debug_file_ops;
                id->proc_entries[i] = pde;
        }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to