Skip to content

Commit d901aaa

Browse files
rustyrussellgregkh
authored andcommitted
drivers/staging/speakup/: avoid world-writable sysfs files.
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Christopher Brannon <[email protected]> Cc: Samuel Thibault <[email protected]> Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent db4d717 commit d901aaa

16 files changed

+150
-150
lines changed

drivers/staging/speakup/kobjects.c

+31-31
Original file line numberDiff line numberDiff line change
@@ -851,75 +851,75 @@ static ssize_t message_store(struct kobject *kobj, struct kobj_attribute *attr,
851851
* Declare the attributes.
852852
*/
853853
static struct kobj_attribute keymap_attribute =
854-
__ATTR(keymap, S_IWUSR|S_IRUGO, keymap_show, keymap_store);
854+
__ATTR_RW(keymap);
855855
static struct kobj_attribute silent_attribute =
856-
__ATTR(silent, S_IWUGO, NULL, silent_store);
856+
__ATTR_WO(silent);
857857
static struct kobj_attribute synth_attribute =
858-
__ATTR(synth, S_IWUGO|S_IRUGO, synth_show, synth_store);
858+
__ATTR_RW(synth);
859859
static struct kobj_attribute synth_direct_attribute =
860-
__ATTR(synth_direct, S_IWUGO, NULL, synth_direct_store);
860+
__ATTR_WO(synth_direct);
861861
static struct kobj_attribute version_attribute =
862862
__ATTR_RO(version);
863863

864864
static struct kobj_attribute delimiters_attribute =
865-
__ATTR(delimiters, S_IWUGO|S_IRUGO, punc_show, punc_store);
865+
__ATTR(delimiters, S_IWUSR|S_IRUGO, punc_show, punc_store);
866866
static struct kobj_attribute ex_num_attribute =
867-
__ATTR(ex_num, S_IWUGO|S_IRUGO, punc_show, punc_store);
867+
__ATTR(ex_num, S_IWUSR|S_IRUGO, punc_show, punc_store);
868868
static struct kobj_attribute punc_all_attribute =
869-
__ATTR(punc_all, S_IWUGO|S_IRUGO, punc_show, punc_store);
869+
__ATTR(punc_all, S_IWUSR|S_IRUGO, punc_show, punc_store);
870870
static struct kobj_attribute punc_most_attribute =
871-
__ATTR(punc_most, S_IWUGO|S_IRUGO, punc_show, punc_store);
871+
__ATTR(punc_most, S_IWUSR|S_IRUGO, punc_show, punc_store);
872872
static struct kobj_attribute punc_some_attribute =
873-
__ATTR(punc_some, S_IWUGO|S_IRUGO, punc_show, punc_store);
873+
__ATTR(punc_some, S_IWUSR|S_IRUGO, punc_show, punc_store);
874874
static struct kobj_attribute repeats_attribute =
875-
__ATTR(repeats, S_IWUGO|S_IRUGO, punc_show, punc_store);
875+
__ATTR(repeats, S_IWUSR|S_IRUGO, punc_show, punc_store);
876876

877877
static struct kobj_attribute attrib_bleep_attribute =
878-
__ATTR(attrib_bleep, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
878+
__ATTR(attrib_bleep, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
879879
static struct kobj_attribute bell_pos_attribute =
880-
__ATTR(bell_pos, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
880+
__ATTR(bell_pos, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
881881
static struct kobj_attribute bleep_time_attribute =
882-
__ATTR(bleep_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
882+
__ATTR(bleep_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
883883
static struct kobj_attribute bleeps_attribute =
884-
__ATTR(bleeps, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
884+
__ATTR(bleeps, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
885885
static struct kobj_attribute cursor_time_attribute =
886-
__ATTR(cursor_time, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
886+
__ATTR(cursor_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
887887
static struct kobj_attribute key_echo_attribute =
888-
__ATTR(key_echo, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
888+
__ATTR(key_echo, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
889889
static struct kobj_attribute no_interrupt_attribute =
890-
__ATTR(no_interrupt, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
890+
__ATTR(no_interrupt, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
891891
static struct kobj_attribute punc_level_attribute =
892-
__ATTR(punc_level, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
892+
__ATTR(punc_level, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
893893
static struct kobj_attribute reading_punc_attribute =
894-
__ATTR(reading_punc, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
894+
__ATTR(reading_punc, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
895895
static struct kobj_attribute say_control_attribute =
896-
__ATTR(say_control, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
896+
__ATTR(say_control, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
897897
static struct kobj_attribute say_word_ctl_attribute =
898-
__ATTR(say_word_ctl, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
898+
__ATTR(say_word_ctl, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
899899
static struct kobj_attribute spell_delay_attribute =
900-
__ATTR(spell_delay, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
900+
__ATTR(spell_delay, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
901901

902902
/*
903903
* These attributes are i18n related.
904904
*/
905905
static struct kobj_attribute announcements_attribute =
906-
__ATTR(announcements, S_IWUGO|S_IRUGO, message_show, message_store);
906+
__ATTR(announcements, S_IWUSR|S_IRUGO, message_show, message_store);
907907
static struct kobj_attribute characters_attribute =
908-
__ATTR(characters, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
908+
__ATTR(characters, S_IWUSR|S_IRUGO, chars_chartab_show, chars_chartab_store);
909909
static struct kobj_attribute chartab_attribute =
910-
__ATTR(chartab, S_IWUGO|S_IRUGO, chars_chartab_show, chars_chartab_store);
910+
__ATTR(chartab, S_IWUSR|S_IRUGO, chars_chartab_show, chars_chartab_store);
911911
static struct kobj_attribute ctl_keys_attribute =
912-
__ATTR(ctl_keys, S_IWUGO|S_IRUGO, message_show, message_store);
912+
__ATTR(ctl_keys, S_IWUSR|S_IRUGO, message_show, message_store);
913913
static struct kobj_attribute colors_attribute =
914-
__ATTR(colors, S_IWUGO|S_IRUGO, message_show, message_store);
914+
__ATTR(colors, S_IWUSR|S_IRUGO, message_show, message_store);
915915
static struct kobj_attribute formatted_attribute =
916-
__ATTR(formatted, S_IWUGO|S_IRUGO, message_show, message_store);
916+
__ATTR(formatted, S_IWUSR|S_IRUGO, message_show, message_store);
917917
static struct kobj_attribute function_names_attribute =
918-
__ATTR(function_names, S_IWUGO|S_IRUGO, message_show, message_store);
918+
__ATTR(function_names, S_IWUSR|S_IRUGO, message_show, message_store);
919919
static struct kobj_attribute key_names_attribute =
920-
__ATTR(key_names, S_IWUGO|S_IRUGO, message_show, message_store);
920+
__ATTR(key_names, S_IWUSR|S_IRUGO, message_show, message_store);
921921
static struct kobj_attribute states_attribute =
922-
__ATTR(states, S_IWUGO|S_IRUGO, message_show, message_store);
922+
__ATTR(states, S_IWUSR|S_IRUGO, message_show, message_store);
923923

924924
/*
925925
* Create groups of attributes so that we can create and destroy them all

drivers/staging/speakup/speakup_acntpc.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ static struct var_t vars[] = {
6262
* These attributes will appear in /sys/accessibility/speakup/acntpc.
6363
*/
6464
static struct kobj_attribute caps_start_attribute =
65-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6666
static struct kobj_attribute caps_stop_attribute =
67-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
67+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6868
static struct kobj_attribute pitch_attribute =
69-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7070
static struct kobj_attribute rate_attribute =
71-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
71+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7272
static struct kobj_attribute tone_attribute =
73-
__ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73+
__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7474
static struct kobj_attribute vol_attribute =
75-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7676

7777
static struct kobj_attribute delay_time_attribute =
7878
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7979
static struct kobj_attribute direct_attribute =
80-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
80+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8181
static struct kobj_attribute full_time_attribute =
8282
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8383
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_acntsa.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@ static struct var_t vars[] = {
4747
* These attributes will appear in /sys/accessibility/speakup/acntsa.
4848
*/
4949
static struct kobj_attribute caps_start_attribute =
50-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
50+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5151
static struct kobj_attribute caps_stop_attribute =
52-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5353
static struct kobj_attribute pitch_attribute =
54-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5555
static struct kobj_attribute rate_attribute =
56-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5757
static struct kobj_attribute tone_attribute =
58-
__ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58+
__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5959
static struct kobj_attribute vol_attribute =
60-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6161

6262
static struct kobj_attribute delay_time_attribute =
6363
__ATTR(delay_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
6464
static struct kobj_attribute direct_attribute =
65-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
65+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6666
static struct kobj_attribute full_time_attribute =
6767
__ATTR(full_time, S_IRUSR|S_IRUGO, spk_var_show, spk_var_store);
6868
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_apollo.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,24 @@ static struct var_t vars[] = {
5353
* These attributes will appear in /sys/accessibility/speakup/apollo.
5454
*/
5555
static struct kobj_attribute caps_start_attribute =
56-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5757
static struct kobj_attribute caps_stop_attribute =
58-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5959
static struct kobj_attribute lang_attribute =
60-
__ATTR(lang, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60+
__ATTR(lang, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6161
static struct kobj_attribute pitch_attribute =
62-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
62+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6363
static struct kobj_attribute rate_attribute =
64-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
64+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6565
static struct kobj_attribute voice_attribute =
66-
__ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
66+
__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6767
static struct kobj_attribute vol_attribute =
68-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
68+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6969

7070
static struct kobj_attribute delay_time_attribute =
7171
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7272
static struct kobj_attribute direct_attribute =
73-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7474
static struct kobj_attribute full_time_attribute =
7575
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7676
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_audptr.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@ static struct var_t vars[] = {
4949
* These attributes will appear in /sys/accessibility/speakup/audptr.
5050
*/
5151
static struct kobj_attribute caps_start_attribute =
52-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
52+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5353
static struct kobj_attribute caps_stop_attribute =
54-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
54+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5555
static struct kobj_attribute pitch_attribute =
56-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
56+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5757
static struct kobj_attribute punct_attribute =
58-
__ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
58+
__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5959
static struct kobj_attribute rate_attribute =
60-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
60+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6161
static struct kobj_attribute tone_attribute =
62-
__ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
62+
__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6363
static struct kobj_attribute vol_attribute =
64-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
64+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6565

6666
static struct kobj_attribute delay_time_attribute =
6767
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6868
static struct kobj_attribute direct_attribute =
69-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
69+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7070
static struct kobj_attribute full_time_attribute =
7171
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7272
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_bns.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ static struct var_t vars[] = {
4444
* These attributes will appear in /sys/accessibility/speakup/bns.
4545
*/
4646
static struct kobj_attribute caps_start_attribute =
47-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
47+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
4848
static struct kobj_attribute caps_stop_attribute =
49-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
49+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5050
static struct kobj_attribute pitch_attribute =
51-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
51+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5252
static struct kobj_attribute rate_attribute =
53-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
53+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5454
static struct kobj_attribute tone_attribute =
55-
__ATTR(tone, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
55+
__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5656
static struct kobj_attribute vol_attribute =
57-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
57+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
5858

5959
static struct kobj_attribute delay_time_attribute =
6060
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6161
static struct kobj_attribute direct_attribute =
62-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
62+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6363
static struct kobj_attribute full_time_attribute =
6464
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
6565
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_decext.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,24 @@ static struct var_t vars[] = {
7070
* These attributes will appear in /sys/accessibility/speakup/decext.
7171
*/
7272
static struct kobj_attribute caps_start_attribute =
73-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7474
static struct kobj_attribute caps_stop_attribute =
75-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7676
static struct kobj_attribute pitch_attribute =
77-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
77+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7878
static struct kobj_attribute punct_attribute =
79-
__ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
79+
__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8080
static struct kobj_attribute rate_attribute =
81-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
81+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8282
static struct kobj_attribute voice_attribute =
83-
__ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
83+
__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8484
static struct kobj_attribute vol_attribute =
85-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
85+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8686

8787
static struct kobj_attribute delay_time_attribute =
8888
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8989
static struct kobj_attribute direct_attribute =
90-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
90+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
9191
static struct kobj_attribute full_time_attribute =
9292
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
9393
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_decpc.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,24 @@ static struct var_t vars[] = {
164164
* These attributes will appear in /sys/accessibility/speakup/decpc.
165165
*/
166166
static struct kobj_attribute caps_start_attribute =
167-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
167+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
168168
static struct kobj_attribute caps_stop_attribute =
169-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
169+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
170170
static struct kobj_attribute pitch_attribute =
171-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
171+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
172172
static struct kobj_attribute punct_attribute =
173-
__ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
173+
__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
174174
static struct kobj_attribute rate_attribute =
175-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
175+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
176176
static struct kobj_attribute voice_attribute =
177-
__ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
177+
__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
178178
static struct kobj_attribute vol_attribute =
179-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
179+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
180180

181181
static struct kobj_attribute delay_time_attribute =
182182
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
183183
static struct kobj_attribute direct_attribute =
184-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
184+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
185185
static struct kobj_attribute full_time_attribute =
186186
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
187187
static struct kobj_attribute jiffy_delta_attribute =

drivers/staging/speakup/speakup_dectlk.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,24 @@ static struct var_t vars[] = {
7070
* These attributes will appear in /sys/accessibility/speakup/dectlk.
7171
*/
7272
static struct kobj_attribute caps_start_attribute =
73-
__ATTR(caps_start, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
73+
__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7474
static struct kobj_attribute caps_stop_attribute =
75-
__ATTR(caps_stop, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
75+
__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7676
static struct kobj_attribute pitch_attribute =
77-
__ATTR(pitch, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
77+
__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
7878
static struct kobj_attribute punct_attribute =
79-
__ATTR(punct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
79+
__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8080
static struct kobj_attribute rate_attribute =
81-
__ATTR(rate, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
81+
__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8282
static struct kobj_attribute voice_attribute =
83-
__ATTR(voice, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
83+
__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8484
static struct kobj_attribute vol_attribute =
85-
__ATTR(vol, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
85+
__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8686

8787
static struct kobj_attribute delay_time_attribute =
8888
__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
8989
static struct kobj_attribute direct_attribute =
90-
__ATTR(direct, S_IWUGO|S_IRUGO, spk_var_show, spk_var_store);
90+
__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
9191
static struct kobj_attribute full_time_attribute =
9292
__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
9393
static struct kobj_attribute jiffy_delta_attribute =

0 commit comments

Comments
 (0)