public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Casey Dahlin <cdahlin@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: eteo@redhat.com, "Bryn M. Reeves" <bmr@redhat.com>,
	Casey Dahlin <cdahlin@redhat.com>,
	Neela Syam Kolli <megaraidlinux@lsi.com>,
	"James E.J. Bottomley" <James.Bottomley@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yang Hongyang <yanghy@cn.fujitsu.com>,
	Anand Gadiyar <gadiyar@ti.com>, Jiri Kosina <jkosina@suse.cz>,
	linux-scsi@vger.kernel.org
Subject: [PATCH] [SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions
Date: Wed, 02 Dec 2009 10:17:44 -0500	[thread overview]
Message-ID: <1259767064-13738-1-git-send-email-cdahlin@redhat.com> (raw)

From: Bryn M. Reeves <bmr@redhat.com>

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being
world-writable, which seems bad (letting any user affect kernel driver
behavior).

This turns off group and user write permissions, so that on typical
production systems only root can write to it.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
---
 drivers/scsi/megaraid/megaraid_sas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index a39addc..08a7f49 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -3451,7 +3451,7 @@ out:
 	return retval;
 }
 
-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO,
+static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR,
 		megasas_sysfs_show_poll_mode_io,
 		megasas_sysfs_set_poll_mode_io);
 
-- 
1.6.2.5


             reply	other threads:[~2009-12-03  0:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 15:17 Casey Dahlin [this message]
2009-12-03  0:08 ` [PATCH] [SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions Eugene Teo
2009-12-03 15:01   ` Yang, Bo
2009-12-04 13:38     ` Bryn M. Reeves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259767064-13738-1-git-send-email-cdahlin@redhat.com \
    --to=cdahlin@redhat.com \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=bmr@redhat.com \
    --cc=eteo@redhat.com \
    --cc=gadiyar@ti.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=megaraidlinux@lsi.com \
    --cc=yanghy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox