lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1410563212-31565-5-git-send-email-fransklaver@gmail.com>
Date:	Sat, 13 Sep 2014 01:06:43 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Darren Hart <dvhart@...radead.org>
Cc:	Frans Klaver <fransklaver@...il.com>,
	Corentin Chary <corentin.chary@...il.com>,
	Rafael Wysocki <rafael.j.wysocki@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	acpi4asus-user@...ts.sourceforge.net,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 04/13] eeepc-laptop: use symbolic permissions in device attributes

Signed-off-by: Frans Klaver <fransklaver@...il.com>
---
 drivers/platform/x86/eeepc-laptop.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 9d8dff9..f35d008 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -316,9 +316,9 @@ static ssize_t show_sys_acpi(struct device *dev, int cm, char *buf)
 		.store  = store_##_name,				\
 	}
 
-EEEPC_CREATE_DEVICE_ATTR(camera, 0644, CM_ASL_CAMERA);
-EEEPC_CREATE_DEVICE_ATTR(cardr, 0644, CM_ASL_CARDREADER);
-EEEPC_CREATE_DEVICE_ATTR(disp, 0200, CM_ASL_DISPLAYSWITCH);
+EEEPC_CREATE_DEVICE_ATTR(camera, S_IWUSR | S_IRUGO, CM_ASL_CAMERA);
+EEEPC_CREATE_DEVICE_ATTR(cardr, S_IWUSR | S_IRUGO, CM_ASL_CARDREADER);
+EEEPC_CREATE_DEVICE_ATTR(disp, S_IWUSR, CM_ASL_DISPLAYSWITCH);
 
 struct eeepc_cpufv {
 	int num;
@@ -423,7 +423,7 @@ static ssize_t store_cpufv_disabled(struct device *dev,
 static struct device_attribute dev_attr_cpufv = {
 	.attr = {
 		.name = "cpufv",
-		.mode = 0644 },
+		.mode = S_IWUSR | S_IRUGO },
 	.show   = show_cpufv,
 	.store  = store_cpufv
 };
@@ -431,14 +431,14 @@ static struct device_attribute dev_attr_cpufv = {
 static struct device_attribute dev_attr_available_cpufv = {
 	.attr = {
 		.name = "available_cpufv",
-		.mode = 0444 },
+		.mode = S_IRUGO },
 	.show   = show_available_cpufv
 };
 
 static struct device_attribute dev_attr_cpufv_disabled = {
 	.attr = {
 		.name = "cpufv_disabled",
-		.mode = 0644 },
+		.mode = S_IWUSR | S_IRUGO},
 	.show   = show_cpufv_disabled,
 	.store  = store_cpufv_disabled
 };
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ