Patchwork [012/139] ab8500-chargalg: Only root should have write permission on sysfs file

login
register
mail settings
Submitter Luis Henriques
Date Feb. 28, 2013, 2:42 p.m.
Message ID <1362062689-2567-13-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/223988/
State New
Headers show

Comments

Luis Henriques - Feb. 28, 2013, 2:42 p.m.
3.5.7.7 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lee Jones <lee.jones@linaro.org>

commit e3455002d04276c256a531f7175dce0f7d1cb78a upstream.

Only root should have write permission on sysfs file ab8500_chargalg/chargalg.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/power/abx500_chargalg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
index 804b88c..d8cd151 100644
--- a/drivers/power/abx500_chargalg.c
+++ b/drivers/power/abx500_chargalg.c
@@ -1698,7 +1698,7 @@  static ssize_t abx500_chargalg_sysfs_charger(struct kobject *kobj,
 static struct attribute abx500_chargalg_en_charger = \
 {
 	.name = "chargalg",
-	.mode = S_IWUGO,
+	.mode = S_IWUSR,
 };
 
 static struct attribute *abx500_chargalg_chg[] = {