* [patch 5/8] s390: s390dbf permissions.
@ 2005-03-17 14:56 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2005-03-17 14:56 UTC (permalink / raw)
To: akpm, linux-kernel
[patch 5/8] s390: s390dbf permissions.
From: Michael Holzheu <holzheu@de.ibm.com>
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 <schwidefsky@de.ibm.com>
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-17 14:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17 14:56 [patch 5/8] s390: s390dbf permissions Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®