Skip to content
This repository has been archived by the owner on Dec 14, 2019. It is now read-only.

Commit

Permalink
Remove world-write permission for sysfs attributes
Browse files Browse the repository at this point in the history
Fixes build for kernels version 3.17 and above.
  • Loading branch information
CMoH committed Jan 5, 2015
1 parent 529cd78 commit 91b0a91
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions hid-g110.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ static const struct led_classdev g110_led_cdevs[6] = {
},
};

static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -416,7 +416,7 @@ static ssize_t g110_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g110_name_show, g110_name_store);
static DEVICE_ATTR(name, 0664, g110_name_show, g110_name_store);

static void g110_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down
8 changes: 4 additions & 4 deletions hid-g13.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static const unsigned int g13_default_key_map[G13_KEYS] = {


static DEVICE_ATTR(fb_node, 0444, gfb_fb_node_show, NULL);
static DEVICE_ATTR(fb_update_rate, 0666,
static DEVICE_ATTR(fb_update_rate, 0664,
gfb_fb_update_rate_show,
gfb_fb_update_rate_store);

Expand Down Expand Up @@ -364,11 +364,11 @@ static const struct led_classdev g13_led_cdevs[LED_COUNT] = {
},
};

static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -441,7 +441,7 @@ static ssize_t g13_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g13_name_show, g13_name_store);
static DEVICE_ATTR(name, 0664, g13_name_show, g13_name_store);

static void g13_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down
8 changes: 4 additions & 4 deletions hid-g15.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static const unsigned int g15_default_key_map[G15_KEYS] = {

static DEVICE_ATTR(fb_node, 0444, gfb_fb_node_show, NULL);

static DEVICE_ATTR(fb_update_rate, 0666,
static DEVICE_ATTR(fb_update_rate, 0664,
gfb_fb_update_rate_show,
gfb_fb_update_rate_store);

Expand Down Expand Up @@ -402,11 +402,11 @@ static const struct led_classdev g15_led_cdevs[7] = {
},
};

static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -479,7 +479,7 @@ static ssize_t g15_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g15_name_show, g15_name_store);
static DEVICE_ATTR(name, 0664, g15_name_show, g15_name_store);

static void g15_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down
8 changes: 4 additions & 4 deletions hid-g15v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static const unsigned int g15v2_default_key_map[G15V2_KEYS] = {

static DEVICE_ATTR(fb_node, 0444, gfb_fb_node_show, NULL);

static DEVICE_ATTR(fb_update_rate, 0666,
static DEVICE_ATTR(fb_update_rate, 0664,
gfb_fb_update_rate_show,
gfb_fb_update_rate_store);

Expand Down Expand Up @@ -322,11 +322,11 @@ static const struct led_classdev g15v2_led_cdevs[7] = {
},
};

static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -399,7 +399,7 @@ static ssize_t g15v2_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g15v2_name_show, g15v2_name_store);
static DEVICE_ATTR(name, 0664, g15v2_name_show, g15v2_name_store);

static void g15v2_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down
8 changes: 4 additions & 4 deletions hid-g19.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static const unsigned int g19_default_key_map[G19_KEYS] = {

static DEVICE_ATTR(fb_node, 0444, gfb_fb_node_show, NULL);

static DEVICE_ATTR(fb_update_rate, 0666,
static DEVICE_ATTR(fb_update_rate, 0664,
gfb_fb_update_rate_show,
gfb_fb_update_rate_store);

Expand Down Expand Up @@ -446,11 +446,11 @@ static const struct led_classdev g19_led_cdevs[LED_COUNT] = {
},
};

static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -523,7 +523,7 @@ static ssize_t g19_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g19_name_show, g19_name_store);
static DEVICE_ATTR(name, 0664, g19_name_show, g19_name_store);

static void g19_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down
8 changes: 4 additions & 4 deletions hid-g510.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static const unsigned int g510_default_key_map[G510_KEYS] = {

static DEVICE_ATTR(fb_node, 0444, gfb_fb_node_show, NULL);

static DEVICE_ATTR(fb_update_rate, 0666,
static DEVICE_ATTR(fb_update_rate, 0664,
gfb_fb_update_rate_show,
gfb_fb_update_rate_store);

Expand Down Expand Up @@ -345,11 +345,11 @@ static const struct led_classdev g510_led_cdevs[LED_COUNT] = {
};


static DEVICE_ATTR(keymap_index, 0666,
static DEVICE_ATTR(keymap_index, 0664,
ginput_keymap_index_show,
ginput_keymap_index_store);

static DEVICE_ATTR(keymap, 0666,
static DEVICE_ATTR(keymap, 0664,
ginput_keymap_show,
ginput_keymap_store);

Expand Down Expand Up @@ -423,7 +423,7 @@ static ssize_t g510_name_store(struct device *dev,
return count;
}

static DEVICE_ATTR(name, 0666, g510_name_show, g510_name_store);
static DEVICE_ATTR(name, 0664, g510_name_show, g510_name_store);

static void g510_feature_report_4_send(struct hid_device *hdev, int which)
{
Expand Down

0 comments on commit 91b0a91

Please sign in to comment.