diff options
| author | Joe Perches <joe@perches.com> | 2018-03-23 18:54:38 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-03-26 12:07:48 -0400 |
| commit | d6444062f8f07c346a21bd815af4a3dc8b231574 (patch) | |
| tree | 5a50d845638e4b2b2182027302144afa78d7d35b | |
| parent | cb6219a2f564920c6e96e99d174cae3df88fe1bc (diff) | |
net: Use octal not symbolic permissions
Prefer the direct use of octal for permissions.
Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace
and some typing.
Miscellanea:
o Whitespace neatening around these conversions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
63 files changed, 161 insertions, 161 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index a662ccc166df..a627a5db2125 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
| @@ -148,8 +148,8 @@ int __net_init vlan_proc_init(struct net *net) | |||
| 148 | if (!vn->proc_vlan_dir) | 148 | if (!vn->proc_vlan_dir) |
| 149 | goto err; | 149 | goto err; |
| 150 | 150 | ||
| 151 | vn->proc_vlan_conf = proc_create(name_conf, S_IFREG|S_IRUSR|S_IWUSR, | 151 | vn->proc_vlan_conf = proc_create(name_conf, S_IFREG | 0600, |
| 152 | vn->proc_vlan_dir, &vlan_fops); | 152 | vn->proc_vlan_dir, &vlan_fops); |
| 153 | if (!vn->proc_vlan_conf) | 153 | if (!vn->proc_vlan_conf) |
| 154 | goto err; | 154 | goto err; |
| 155 | return 0; | 155 | return 0; |
| @@ -172,7 +172,7 @@ int vlan_proc_add_dev(struct net_device *vlandev) | |||
| 172 | if (!strcmp(vlandev->name, name_conf)) | 172 | if (!strcmp(vlandev->name, name_conf)) |
| 173 | return -EINVAL; | 173 | return -EINVAL; |
| 174 | vlan->dent = | 174 | vlan->dent = |
| 175 | proc_create_data(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR, | 175 | proc_create_data(vlandev->name, S_IFREG | 0600, |
| 176 | vn->proc_vlan_dir, &vlandev_fops, vlandev); | 176 | vn->proc_vlan_dir, &vlandev_fops, vlandev); |
| 177 | if (!vlan->dent) | 177 | if (!vlan->dent) |
| 178 | return -ENOBUFS; | 178 | return -ENOBUFS; |
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index a3bf9d519193..7214aea14cb3 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c | |||
| @@ -257,22 +257,22 @@ int __init atalk_proc_init(void) | |||
| 257 | if (!atalk_proc_dir) | 257 | if (!atalk_proc_dir) |
| 258 | goto out; | 258 | goto out; |
| 259 | 259 | ||
| 260 | p = proc_create("interface", S_IRUGO, atalk_proc_dir, | 260 | p = proc_create("interface", 0444, atalk_proc_dir, |
| 261 | &atalk_seq_interface_fops); | 261 | &atalk_seq_interface_fops); |
| 262 | if (!p) | 262 | if (!p) |
| 263 | goto out_interface; | 263 | goto out_interface; |
| 264 | 264 | ||
| 265 | p = proc_create("route", S_IRUGO, atalk_proc_dir, | 265 | p = proc_create("route", 0444, atalk_proc_dir, |
| 266 | &atalk_seq_route_fops); | 266 | &atalk_seq_route_fops); |
| 267 | if (!p) | 267 | if (!p) |
| 268 | goto out_route; | 268 | goto out_route; |
| 269 | 269 | ||
| 270 | p = proc_create("socket", S_IRUGO, atalk_proc_dir, | 270 | p = proc_create("socket", 0444, atalk_proc_dir, |
| 271 | &atalk_seq_socket_fops); | 271 | &atalk_seq_socket_fops); |
| 272 | if (!p) | 272 | if (!p) |
| 273 | goto out_socket; | 273 | goto out_socket; |
| 274 | 274 | ||
| 275 | p = proc_create("arp", S_IRUGO, atalk_proc_dir, &atalk_seq_arp_fops); | 275 | p = proc_create("arp", 0444, atalk_proc_dir, &atalk_seq_arp_fops); |
| 276 | if (!p) | 276 | if (!p) |
| 277 | goto out_arp; | 277 | goto out_arp; |
| 278 | 278 | ||
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c index 5d2fed9f5710..39b94ca5f65d 100644 --- a/net/atm/atm_sysfs.c +++ b/net/atm/atm_sysfs.c | |||
| @@ -96,12 +96,12 @@ static ssize_t show_link_rate(struct device *cdev, | |||
| 96 | return scnprintf(buf, PAGE_SIZE, "%d\n", link_rate); | 96 | return scnprintf(buf, PAGE_SIZE, "%d\n", link_rate); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static DEVICE_ATTR(address, S_IRUGO, show_address, NULL); | 99 | static DEVICE_ATTR(address, 0444, show_address, NULL); |
| 100 | static DEVICE_ATTR(atmaddress, S_IRUGO, show_atmaddress, NULL); | 100 | static DEVICE_ATTR(atmaddress, 0444, show_atmaddress, NULL); |
| 101 | static DEVICE_ATTR(atmindex, S_IRUGO, show_atmindex, NULL); | 101 | static DEVICE_ATTR(atmindex, 0444, show_atmindex, NULL); |
| 102 | static DEVICE_ATTR(carrier, S_IRUGO, show_carrier, NULL); | 102 | static DEVICE_ATTR(carrier, 0444, show_carrier, NULL); |
| 103 | static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); | 103 | static DEVICE_ATTR(type, 0444, show_type, NULL); |
| 104 | static DEVICE_ATTR(link_rate, S_IRUGO, show_link_rate, NULL); | 104 | static DEVICE_ATTR(link_rate, 0444, show_link_rate, NULL); |
| 105 | 105 | ||
| 106 | static struct device_attribute *atm_attrs[] = { | 106 | static struct device_attribute *atm_attrs[] = { |
| 107 | &dev_attr_atmaddress, | 107 | &dev_attr_atmaddress, |
diff --git a/net/atm/clip.c b/net/atm/clip.c index d4f6029d5109..f07dbc632222 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
| @@ -893,7 +893,7 @@ static int __init atm_clip_init(void) | |||
| 893 | { | 893 | { |
| 894 | struct proc_dir_entry *p; | 894 | struct proc_dir_entry *p; |
| 895 | 895 | ||
| 896 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); | 896 | p = proc_create("arp", 0444, atm_proc_root, &arp_seq_fops); |
| 897 | if (!p) { | 897 | if (!p) { |
| 898 | pr_err("Unable to initialize /proc/net/atm/arp\n"); | 898 | pr_err("Unable to initialize /proc/net/atm/arp\n"); |
| 899 | atm_clip_exit_noproc(); | 899 | atm_clip_exit_noproc(); |
diff --git a/net/atm/lec.c b/net/atm/lec.c index 09a1f056712a..01d5d20a6eb1 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
| @@ -1042,7 +1042,7 @@ static int __init lane_module_init(void) | |||
| 1042 | #ifdef CONFIG_PROC_FS | 1042 | #ifdef CONFIG_PROC_FS |
| 1043 | struct proc_dir_entry *p; | 1043 | struct proc_dir_entry *p; |
| 1044 | 1044 | ||
| 1045 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); | 1045 | p = proc_create("lec", 0444, atm_proc_root, &lec_seq_fops); |
| 1046 | if (!p) { | 1046 | if (!p) { |
| 1047 | pr_err("Unable to initialize /proc/net/atm/lec\n"); | 1047 | pr_err("Unable to initialize /proc/net/atm/lec\n"); |
| 1048 | return -ENOMEM; | 1048 | return -ENOMEM; |
diff --git a/net/atm/proc.c b/net/atm/proc.c index edc48edc95c1..55410c00c7e2 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
| @@ -474,7 +474,7 @@ int __init atm_proc_init(void) | |||
| 474 | for (e = atm_proc_ents; e->name; e++) { | 474 | for (e = atm_proc_ents; e->name; e++) { |
| 475 | struct proc_dir_entry *dirent; | 475 | struct proc_dir_entry *dirent; |
| 476 | 476 | ||
| 477 | dirent = proc_create(e->name, S_IRUGO, | 477 | dirent = proc_create(e->name, 0444, |
| 478 | atm_proc_root, e->proc_fops); | 478 | atm_proc_root, e->proc_fops); |
| 479 | if (!dirent) | 479 | if (!dirent) |
| 480 | goto err_out_remove; | 480 | goto err_out_remove; |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index c8319ed48485..2b41366fcad2 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
| @@ -1989,10 +1989,10 @@ static int __init ax25_init(void) | |||
| 1989 | dev_add_pack(&ax25_packet_type); | 1989 | dev_add_pack(&ax25_packet_type); |
| 1990 | register_netdevice_notifier(&ax25_dev_notifier); | 1990 | register_netdevice_notifier(&ax25_dev_notifier); |
| 1991 | 1991 | ||
| 1992 | proc_create("ax25_route", S_IRUGO, init_net.proc_net, | 1992 | proc_create("ax25_route", 0444, init_net.proc_net, |
| 1993 | &ax25_route_fops); | 1993 | &ax25_route_fops); |
| 1994 | proc_create("ax25", S_IRUGO, init_net.proc_net, &ax25_info_fops); | 1994 | proc_create("ax25", 0444, init_net.proc_net, &ax25_info_fops); |
| 1995 | proc_create("ax25_calls", S_IRUGO, init_net.proc_net, &ax25_uid_fops); | 1995 | proc_create("ax25_calls", 0444, init_net.proc_net, &ax25_uid_fops); |
| 1996 | out: | 1996 | out: |
| 1997 | return rc; | 1997 | return rc; |
| 1998 | } | 1998 | } |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 5f3074cb6b4d..5e44d842cc5d 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
| @@ -210,8 +210,8 @@ static ssize_t show_channel(struct device *tty_dev, struct device_attribute *att | |||
| 210 | return sprintf(buf, "%d\n", dev->channel); | 210 | return sprintf(buf, "%d\n", dev->channel); |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | static DEVICE_ATTR(address, S_IRUGO, show_address, NULL); | 213 | static DEVICE_ATTR(address, 0444, show_address, NULL); |
| 214 | static DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL); | 214 | static DEVICE_ATTR(channel, 0444, show_channel, NULL); |
| 215 | 215 | ||
| 216 | static struct rfcomm_dev *__rfcomm_dev_add(struct rfcomm_dev_req *req, | 216 | static struct rfcomm_dev *__rfcomm_dev_add(struct rfcomm_dev_req *req, |
| 217 | struct rfcomm_dlc *dlc) | 217 | struct rfcomm_dlc *dlc) |
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index b1be0dcfba6b..0318a69888d4 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
| @@ -893,7 +893,7 @@ static ssize_t brforward_read(struct file *filp, struct kobject *kobj, | |||
| 893 | 893 | ||
| 894 | static struct bin_attribute bridge_forward = { | 894 | static struct bin_attribute bridge_forward = { |
| 895 | .attr = { .name = SYSFS_BRIDGE_FDB, | 895 | .attr = { .name = SYSFS_BRIDGE_FDB, |
| 896 | .mode = S_IRUGO, }, | 896 | .mode = 0444, }, |
| 897 | .read = brforward_read, | 897 | .read = brforward_read, |
| 898 | }; | 898 | }; |
| 899 | 899 | ||
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index 126a8ea73c96..fd31ad83ec7b 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c | |||
| @@ -44,7 +44,7 @@ static int store_##_name(struct net_bridge_port *p, unsigned long v) \ | |||
| 44 | { \ | 44 | { \ |
| 45 | return store_flag(p, v, _mask); \ | 45 | return store_flag(p, v, _mask); \ |
| 46 | } \ | 46 | } \ |
| 47 | static BRPORT_ATTR(_name, S_IRUGO | S_IWUSR, \ | 47 | static BRPORT_ATTR(_name, 0644, \ |
| 48 | show_##_name, store_##_name) | 48 | show_##_name, store_##_name) |
| 49 | 49 | ||
| 50 | static int store_flag(struct net_bridge_port *p, unsigned long v, | 50 | static int store_flag(struct net_bridge_port *p, unsigned long v, |
| @@ -71,7 +71,7 @@ static ssize_t show_path_cost(struct net_bridge_port *p, char *buf) | |||
| 71 | return sprintf(buf, "%d\n", p->path_cost); | 71 | return sprintf(buf, "%d\n", p->path_cost); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | static BRPORT_ATTR(path_cost, S_IRUGO | S_IWUSR, | 74 | static BRPORT_ATTR(path_cost, 0644, |
| 75 | show_path_cost, br_stp_set_path_cost); | 75 | show_path_cost, br_stp_set_path_cost); |
| 76 | 76 | ||
| 77 | static ssize_t show_priority(struct net_bridge_port *p, char *buf) | 77 | static ssize_t show_priority(struct net_bridge_port *p, char *buf) |
| @@ -79,91 +79,91 @@ static ssize_t show_priority(struct net_bridge_port *p, char *buf) | |||
| 79 | return sprintf(buf, "%d\n", p->priority); | 79 | return sprintf(buf, "%d\n", p->priority); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static BRPORT_ATTR(priority, S_IRUGO | S_IWUSR, | 82 | static BRPORT_ATTR(priority, 0644, |
| 83 | show_priority, br_stp_set_port_priority); | 83 | show_priority, br_stp_set_port_priority); |
| 84 | 84 | ||
| 85 | static ssize_t show_designated_root(struct net_bridge_port *p, char *buf) | 85 | static ssize_t show_designated_root(struct net_bridge_port *p, char *buf) |
| 86 | { | 86 | { |
| 87 | return br_show_bridge_id(buf, &p->designated_root); | 87 | return br_show_bridge_id(buf, &p->designated_root); |
| 88 | } | 88 | } |
| 89 | static BRPORT_ATTR(designated_root, S_IRUGO, show_designated_root, NULL); | 89 | static BRPORT_ATTR(designated_root, 0444, show_designated_root, NULL); |
| 90 | 90 | ||
| 91 | static ssize_t show_designated_bridge(struct net_bridge_port *p, char *buf) | 91 | static ssize_t show_designated_bridge(struct net_bridge_port *p, char *buf) |
| 92 | { | 92 | { |
| 93 | return br_show_bridge_id(buf, &p->designated_bridge); | 93 | return br_show_bridge_id(buf, &p->designated_bridge); |
| 94 | } | 94 | } |
| 95 | static BRPORT_ATTR(designated_bridge, S_IRUGO, show_designated_bridge, NULL); | 95 | static BRPORT_ATTR(designated_bridge, 0444, show_designated_bridge, NULL); |
| 96 | 96 | ||
| 97 | static ssize_t show_designated_port(struct net_bridge_port *p, char *buf) | 97 | static ssize_t show_designated_port(struct net_bridge_port *p, char *buf) |
| 98 | { | 98 | { |
| 99 | return sprintf(buf, "%d\n", p->designated_port); | 99 | return sprintf(buf, "%d\n", p->designated_port); |
| 100 | } | 100 | } |
| 101 | static BRPORT_ATTR(designated_port, S_IRUGO, show_designated_port, NULL); | 101 | static BRPORT_ATTR(designated_port, 0444, show_designated_port, NULL); |
| 102 | 102 | ||
| 103 | static ssize_t show_designated_cost(struct net_bridge_port *p, char *buf) | 103 | static ssize_t show_designated_cost(struct net_bridge_port *p, char *buf) |
| 104 | { | 104 | { |
| 105 | return sprintf(buf, "%d\n", p->designated_cost); | 105 | return sprintf(buf, "%d\n", p->designated_cost); |
| 106 | } | 106 | } |
| 107 | static BRPORT_ATTR(designated_cost, S_IRUGO, show_designated_cost, NULL); | 107 | static BRPORT_ATTR(designated_cost, 0444, show_designated_cost, NULL); |
| 108 | 108 | ||
| 109 | static ssize_t show_port_id(struct net_bridge_port *p, char *buf) | 109 | static ssize_t show_port_id(struct net_bridge_port *p, char *buf) |
| 110 | { | 110 | { |
| 111 | return sprintf(buf, "0x%x\n", p->port_id); | 111 | return sprintf(buf, "0x%x\n", p->port_id); |
| 112 | } | 112 | } |
| 113 | static BRPORT_ATTR(port_id, S_IRUGO, show_port_id, NULL); | 113 | static BRPORT_ATTR(port_id, 0444, show_port_id, NULL); |
| 114 | 114 | ||
| 115 | static ssize_t show_port_no(struct net_bridge_port *p, char *buf) | 115 | static ssize_t show_port_no(struct net_bridge_port *p, char *buf) |
| 116 | { | 116 | { |
| 117 | return sprintf(buf, "0x%x\n", p->port_no); | 117 | return sprintf(buf, "0x%x\n", p->port_no); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | static BRPORT_ATTR(port_no, S_IRUGO, show_port_no, NULL); | 120 | static BRPORT_ATTR(port_no, 0444, show_port_no, NULL); |
| 121 | 121 | ||
| 122 | static ssize_t show_change_ack(struct net_bridge_port *p, char *buf) | 122 | static ssize_t show_change_ack(struct net_bridge_port *p, char *buf) |
| 123 | { | 123 | { |
| 124 | return sprintf(buf, "%d\n", p->topology_change_ack); | 124 | return sprintf(buf, "%d\n", p->topology_change_ack); |
| 125 | } | 125 | } |
| 126 | static BRPORT_ATTR(change_ack, S_IRUGO, show_change_ack, NULL); | 126 | static BRPORT_ATTR(change_ack, 0444, show_change_ack, NULL); |
| 127 | 127 | ||
| 128 | static ssize_t show_config_pending(struct net_bridge_port *p, char *buf) | 128 | static ssize_t show_config_pending(struct net_bridge_port *p, char *buf) |
| 129 | { | 129 | { |
| 130 | return sprintf(buf, "%d\n", p->config_pending); | 130 | return sprintf(buf, "%d\n", p->config_pending); |
| 131 | } | 131 | } |
| 132 | static BRPORT_ATTR(config_pending, S_IRUGO, show_config_pending, NULL); | 132 | static BRPORT_ATTR(config_pending, 0444, show_config_pending, NULL); |
| 133 | 133 | ||
| 134 | static ssize_t show_port_state(struct net_bridge_port *p, char *buf) | 134 | static ssize_t show_port_state(struct net_bridge_port *p, char *buf) |
| 135 | { | 135 | { |
| 136 | return sprintf(buf, "%d\n", p->state); | 136 | return sprintf(buf, "%d\n", p->state); |
| 137 | } | 137 | } |
| 138 | static BRPORT_ATTR(state, S_IRUGO, show_port_state, NULL); | 138 | static BRPORT_ATTR(state, 0444, show_port_state, NULL); |
| 139 | 139 | ||
| 140 | static ssize_t show_message_age_timer(struct net_bridge_port *p, | 140 | static ssize_t show_message_age_timer(struct net_bridge_port *p, |
| 141 | char *buf) | 141 | char *buf) |
| 142 | { | 142 | { |
| 143 | return sprintf(buf, "%ld\n", br_timer_value(&p->message_age_timer)); | 143 | return sprintf(buf, "%ld\n", br_timer_value(&p->message_age_timer)); |
| 144 | } | 144 | } |
| 145 | static BRPORT_ATTR(message_age_timer, S_IRUGO, show_message_age_timer, NULL); | 145 | static BRPORT_ATTR(message_age_timer, 0444, show_message_age_timer, NULL); |
| 146 | 146 | ||
| 147 | static ssize_t show_forward_delay_timer(struct net_bridge_port *p, | 147 | static ssize_t show_forward_delay_timer(struct net_bridge_port *p, |
| 148 | char *buf) | 148 | char *buf) |
| 149 | { | 149 | { |
| 150 | return sprintf(buf, "%ld\n", br_timer_value(&p->forward_delay_timer)); | 150 | return sprintf(buf, "%ld\n", br_timer_value(&p->forward_delay_timer)); |
| 151 | } | 151 | } |
| 152 | static BRPORT_ATTR(forward_delay_timer, S_IRUGO, show_forward_delay_timer, NULL); | 152 | static BRPORT_ATTR(forward_delay_timer, 0444, show_forward_delay_timer, NULL); |
| 153 | 153 | ||
| 154 | static ssize_t show_hold_timer(struct net_bridge_port *p, | 154 | static ssize_t show_hold_timer(struct net_bridge_port *p, |
| 155 | char *buf) | 155 | char *buf) |
| 156 | { | 156 | { |
| 157 | return sprintf(buf, "%ld\n", br_timer_value(&p->hold_timer)); | 157 | return sprintf(buf, "%ld\n", br_timer_value(&p->hold_timer)); |
| 158 | } | 158 | } |
| 159 | static BRPORT_ATTR(hold_timer, S_IRUGO, show_hold_timer, NULL); | 159 | static BRPORT_ATTR(hold_timer, 0444, show_hold_timer, NULL); |
| 160 | 160 | ||
| 161 | static int store_flush(struct net_bridge_port *p, unsigned long v) | 161 | static int store_flush(struct net_bridge_port *p, unsigned long v) |
| 162 | { | 162 | { |
| 163 | br_fdb_delete_by_port(p->br, p, 0, 0); // Don't delete local entry | 163 | br_fdb_delete_by_port(p->br, p, 0, 0); // Don't delete local entry |
| 164 | return 0; | 164 | return 0; |
| 165 | } | 165 | } |
| 166 | static BRPORT_ATTR(flush, S_IWUSR, NULL, store_flush); | 166 | static BRPORT_ATTR(flush, 0200, NULL, store_flush); |
| 167 | 167 | ||
| 168 | static ssize_t show_group_fwd_mask(struct net_bridge_port *p, char *buf) | 168 | static ssize_t show_group_fwd_mask(struct net_bridge_port *p, char *buf) |
| 169 | { | 169 | { |
| @@ -179,7 +179,7 @@ static int store_group_fwd_mask(struct net_bridge_port *p, | |||
| 179 | 179 | ||
| 180 | return 0; | 180 | return 0; |
| 181 | } | 181 | } |
| 182 | static BRPORT_ATTR(group_fwd_mask, S_IRUGO | S_IWUSR, show_group_fwd_mask, | 182 | static BRPORT_ATTR(group_fwd_mask, 0644, show_group_fwd_mask, |
| 183 | store_group_fwd_mask); | 183 | store_group_fwd_mask); |
| 184 | 184 | ||
| 185 | BRPORT_ATTR_FLAG(hairpin_mode, BR_HAIRPIN_MODE); | 185 | BRPORT_ATTR_FLAG(hairpin_mode, BR_HAIRPIN_MODE); |
| @@ -204,7 +204,7 @@ static int store_multicast_router(struct net_bridge_port *p, | |||
| 204 | { | 204 | { |
| 205 | return br_multicast_set_port_router(p, v); | 205 | return br_multicast_set_port_router(p, v); |
| 206 | } | 206 | } |
| 207 | static BRPORT_ATTR(multicast_router, S_IRUGO | S_IWUSR, show_multicast_router, | 207 | static BRPORT_ATTR(multicast_router, 0644, show_multicast_router, |
| 208 | store_multicast_router); | 208 | store_multicast_router); |
| 209 | 209 | ||
| 210 | BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE); | 210 | BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE); |
diff --git a/net/can/af_can.c b/net/can/af_can.c index e899970398a1..2f0d0a72e4b5 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c | |||
| @@ -72,7 +72,7 @@ MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>, " | |||
| 72 | MODULE_ALIAS_NETPROTO(PF_CAN); | 72 | MODULE_ALIAS_NETPROTO(PF_CAN); |
| 73 | 73 | ||
| 74 | static int stats_timer __read_mostly = 1; | 74 | static int stats_timer __read_mostly = 1; |
| 75 | module_param(stats_timer, int, S_IRUGO); | 75 | module_param(stats_timer, int, 0444); |
| 76 | MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)"); | 76 | MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)"); |
| 77 | 77 | ||
| 78 | static struct kmem_cache *rcv_cache __read_mostly; | 78 | static struct kmem_cache *rcv_cache __read_mostly; |
diff --git a/net/can/gw.c b/net/can/gw.c index 08e97668d5cf..8d71e199d5b3 100644 --- a/net/can/gw.c +++ b/net/can/gw.c | |||
| @@ -72,7 +72,7 @@ MODULE_ALIAS(CAN_GW_NAME); | |||
| 72 | #define CGW_DEFAULT_HOPS 1 | 72 | #define CGW_DEFAULT_HOPS 1 |
| 73 | 73 | ||
| 74 | static unsigned int max_hops __read_mostly = CGW_DEFAULT_HOPS; | 74 | static unsigned int max_hops __read_mostly = CGW_DEFAULT_HOPS; |
| 75 | module_param(max_hops, uint, S_IRUGO); | 75 | module_param(max_hops, uint, 0444); |
| 76 | MODULE_PARM_DESC(max_hops, | 76 | MODULE_PARM_DESC(max_hops, |
| 77 | "maximum " CAN_GW_NAME " routing hops for CAN frames " | 77 | "maximum " CAN_GW_NAME " routing hops for CAN frames " |
| 78 | "(valid values: " __stringify(CGW_MIN_HOPS) "-" | 78 | "(valid values: " __stringify(CGW_MIN_HOPS) "-" |
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 4d4c82229e9e..4adf07826f4a 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
| @@ -54,7 +54,7 @@ static const struct kernel_param_ops param_ops_supported_features = { | |||
| 54 | .get = param_get_supported_features, | 54 | .get = param_get_supported_features, |
| 55 | }; | 55 | }; |
| 56 | module_param_cb(supported_features, ¶m_ops_supported_features, NULL, | 56 | module_param_cb(supported_features, ¶m_ops_supported_features, NULL, |
| 57 | S_IRUGO); | 57 | 0444); |
| 58 | 58 | ||
| 59 | const char *ceph_msg_type_name(int type) | 59 | const char *ceph_msg_type_name(int type) |
| 60 | { | 60 | { |
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 65b51e778782..dd6ae431d038 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c | |||
| @@ -315,12 +315,12 @@ static int __net_init dev_proc_net_init(struct net *net) | |||
| 315 | { | 315 | { |
| 316 | int rc = -ENOMEM; | 316 | int rc = -ENOMEM; |
| 317 | 317 | ||
| 318 | if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops)) | 318 | if (!proc_create("dev", 0444, net->proc_net, &dev_seq_fops)) |
| 319 | goto out; | 319 | goto out; |
| 320 | if (!proc_create("softnet_stat", S_IRUGO, net->proc_net, | 320 | if (!proc_create("softnet_stat", 0444, net->proc_net, |
| 321 | &softnet_seq_fops)) | 321 | &softnet_seq_fops)) |
| 322 | goto out_dev; | 322 | goto out_dev; |
| 323 | if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops)) | 323 | if (!proc_create("ptype", 0444, net->proc_net, &ptype_seq_fops)) |
| 324 | goto out_softnet; | 324 | goto out_softnet; |
| 325 | 325 | ||
| 326 | if (wext_proc_init(net)) | 326 | if (wext_proc_init(net)) |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 60a5ad2c33ee..c476f0794132 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
| @@ -431,7 +431,7 @@ static ssize_t group_store(struct device *dev, struct device_attribute *attr, | |||
| 431 | return netdev_store(dev, attr, buf, len, change_group); | 431 | return netdev_store(dev, attr, buf, len, change_group); |
| 432 | } | 432 | } |
| 433 | NETDEVICE_SHOW(group, fmt_dec); | 433 | NETDEVICE_SHOW(group, fmt_dec); |
| 434 | static DEVICE_ATTR(netdev_group, S_IRUGO | S_IWUSR, group_show, group_store); | 434 | static DEVICE_ATTR(netdev_group, 0644, group_show, group_store); |
| 435 | 435 | ||
| 436 | static int change_proto_down(struct net_device *dev, unsigned long proto_down) | 436 | static int change_proto_down(struct net_device *dev, unsigned long proto_down) |
| 437 | { | 437 | { |
| @@ -854,10 +854,10 @@ static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue, | |||
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | static struct rx_queue_attribute rps_cpus_attribute __ro_after_init | 856 | static struct rx_queue_attribute rps_cpus_attribute __ro_after_init |
| 857 | = __ATTR(rps_cpus, S_IRUGO | S_IWUSR, show_rps_map, store_rps_map); | 857 | = __ATTR(rps_cpus, 0644, show_rps_map, store_rps_map); |
| 858 | 858 | ||
| 859 | static struct rx_queue_attribute rps_dev_flow_table_cnt_attribute __ro_after_init | 859 | static struct rx_queue_attribute rps_dev_flow_table_cnt_attribute __ro_after_init |
| 860 | = __ATTR(rps_flow_cnt, S_IRUGO | S_IWUSR, | 860 | = __ATTR(rps_flow_cnt, 0644, |
| 861 | show_rps_dev_flow_table_cnt, store_rps_dev_flow_table_cnt); | 861 | show_rps_dev_flow_table_cnt, store_rps_dev_flow_table_cnt); |
| 862 | #endif /* CONFIG_RPS */ | 862 | #endif /* CONFIG_RPS */ |
| 863 | 863 | ||
| @@ -1154,7 +1154,7 @@ static ssize_t bql_set_hold_time(struct netdev_queue *queue, | |||
| 1154 | } | 1154 | } |
| 1155 | 1155 | ||
| 1156 | static struct netdev_queue_attribute bql_hold_time_attribute __ro_after_init | 1156 | static struct netdev_queue_attribute bql_hold_time_attribute __ro_after_init |
| 1157 | = __ATTR(hold_time, S_IRUGO | S_IWUSR, | 1157 | = __ATTR(hold_time, 0644, |
| 1158 | bql_show_hold_time, bql_set_hold_time); | 1158 | bql_show_hold_time, bql_set_hold_time); |
| 1159 | 1159 | ||
| 1160 | static ssize_t bql_show_inflight(struct netdev_queue *queue, | 1160 | static ssize_t bql_show_inflight(struct netdev_queue *queue, |
| @@ -1166,7 +1166,7 @@ static ssize_t bql_show_inflight(struct netdev_queue *queue, | |||
| 1166 | } | 1166 | } |
| 1167 | 1167 | ||
| 1168 | static struct netdev_queue_attribute bql_inflight_attribute __ro_after_init = | 1168 | static struct netdev_queue_attribute bql_inflight_attribute __ro_after_init = |
| 1169 | __ATTR(inflight, S_IRUGO, bql_show_inflight, NULL); | 1169 | __ATTR(inflight, 0444, bql_show_inflight, NULL); |
| 1170 | 1170 | ||
| 1171 | #define BQL_ATTR(NAME, FIELD) \ | 1171 | #define BQL_ATTR(NAME, FIELD) \ |
| 1172 | static ssize_t bql_show_ ## NAME(struct netdev_queue *queue, \ | 1172 | static ssize_t bql_show_ ## NAME(struct netdev_queue *queue, \ |
| @@ -1182,7 +1182,7 @@ static ssize_t bql_set_ ## NAME(struct netdev_queue *queue, \ | |||
| 1182 | } \ | 1182 | } \ |
| 1183 | \ | 1183 | \ |
| 1184 | static struct netdev_queue_attribute bql_ ## NAME ## _attribute __ro_after_init \ | 1184 | static struct netdev_queue_attribute bql_ ## NAME ## _attribute __ro_after_init \ |
| 1185 | = __ATTR(NAME, S_IRUGO | S_IWUSR, \ | 1185 | = __ATTR(NAME, 0644, \ |
| 1186 | bql_show_ ## NAME, bql_set_ ## NAME) | 1186 | bql_show_ ## NAME, bql_set_ ## NAME) |
| 1187 | 1187 | ||
| 1188 | BQL_ATTR(limit, limit); | 1188 | BQL_ATTR(limit, limit); |
diff --git a/net/core/sock.c b/net/core/sock.c index e689496dfd8a..8cee2920a47f 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
| @@ -3455,7 +3455,7 @@ static const struct file_operations proto_seq_fops = { | |||
| 3455 | 3455 | ||
| 3456 | static __net_init int proto_init_net(struct net *net) | 3456 | static __net_init int proto_init_net(struct net *net) |
| 3457 | { | 3457 | { |
| 3458 | if (!proc_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops)) | 3458 | if (!proc_create("protocols", 0444, net->proc_net, &proto_seq_fops)) |
| 3459 | return -ENOMEM; | 3459 | return -ENOMEM; |
| 3460 | 3460 | ||
| 3461 | return 0; | 3461 | return 0; |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 2ee8306c23e3..32751602767f 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
| @@ -2383,7 +2383,7 @@ static int __init decnet_init(void) | |||
| 2383 | dev_add_pack(&dn_dix_packet_type); | 2383 | dev_add_pack(&dn_dix_packet_type); |
| 2384 | register_netdevice_notifier(&dn_dev_notifier); | 2384 | register_netdevice_notifier(&dn_dev_notifier); |
| 2385 | 2385 | ||
| 2386 | proc_create("decnet", S_IRUGO, init_net.proc_net, &dn_socket_seq_fops); | 2386 | proc_create("decnet", 0444, init_net.proc_net, &dn_socket_seq_fops); |
| 2387 | dn_register_sysctl(); | 2387 | dn_register_sysctl(); |
| 2388 | out: | 2388 | out: |
| 2389 | return rc; | 2389 | return rc; |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index c9f5e1ebb9c8..c03b046478c3 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
| @@ -1424,7 +1424,7 @@ void __init dn_dev_init(void) | |||
| 1424 | rtnl_register_module(THIS_MODULE, PF_DECnet, RTM_GETADDR, | 1424 | rtnl_register_module(THIS_MODULE, PF_DECnet, RTM_GETADDR, |
| 1425 | NULL, dn_nl_dump_ifaddr, 0); | 1425 | NULL, dn_nl_dump_ifaddr, 0); |
| 1426 | 1426 | ||
| 1427 | proc_create("decnet_dev", S_IRUGO, init_net.proc_net, &dn_dev_seq_fops); | 1427 | proc_create("decnet_dev", 0444, init_net.proc_net, &dn_dev_seq_fops); |
| 1428 | 1428 | ||
| 1429 | #ifdef CONFIG_SYSCTL | 1429 | #ifdef CONFIG_SYSCTL |
| 1430 | { | 1430 | { |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 6e37d9e6345e..13156165afa3 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
| @@ -608,7 +608,7 @@ static const struct file_operations dn_neigh_seq_fops = { | |||
| 608 | void __init dn_neigh_init(void) | 608 | void __init dn_neigh_init(void) |
| 609 | { | 609 | { |
| 610 | neigh_table_init(NEIGH_DN_TABLE, &dn_neigh_table); | 610 | neigh_table_init(NEIGH_DN_TABLE, &dn_neigh_table); |
| 611 | proc_create("decnet_neigh", S_IRUGO, init_net.proc_net, | 611 | proc_create("decnet_neigh", 0444, init_net.proc_net, |
| 612 | &dn_neigh_seq_fops); | 612 | &dn_neigh_seq_fops); |
| 613 | } | 613 | } |
| 614 | 614 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index ef20b8e31669..eca0cc6b761f 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
| @@ -1918,7 +1918,7 @@ void __init dn_route_init(void) | |||
| 1918 | 1918 | ||
| 1919 | dn_dst_ops.gc_thresh = (dn_rt_hash_mask + 1); | 1919 | dn_dst_ops.gc_thresh = (dn_rt_hash_mask + 1); |
| 1920 | 1920 | ||
| 1921 | proc_create("decnet_cache", S_IRUGO, init_net.proc_net, | 1921 | proc_create("decnet_cache", 0444, init_net.proc_net, |
| 1922 | &dn_rt_cache_seq_fops); | 1922 | &dn_rt_cache_seq_fops); |
| 1923 | 1923 | ||
| 1924 | #ifdef CONFIG_DECNET_ROUTER | 1924 | #ifdef CONFIG_DECNET_ROUTER |
diff --git a/net/dns_resolver/dns_key.c b/net/dns_resolver/dns_key.c index e1d4d898a007..8396705deffc 100644 --- a/net/dns_resolver/dns_key.c +++ b/net/dns_resolver/dns_key.c | |||
| @@ -38,7 +38,7 @@ MODULE_AUTHOR("Wang Lei"); | |||
| 38 | MODULE_LICENSE("GPL"); | 38 | MODULE_LICENSE("GPL"); |
| 39 | 39 | ||
| 40 | unsigned int dns_resolver_debug; | 40 | unsigned int dns_resolver_debug; |
| 41 | module_param_named(debug, dns_resolver_debug, uint, S_IWUSR | S_IRUGO); | 41 | module_param_named(debug, dns_resolver_debug, uint, 0644); |
| 42 | MODULE_PARM_DESC(debug, "DNS Resolver debugging mask"); | 42 | MODULE_PARM_DESC(debug, "DNS Resolver debugging mask"); |
| 43 | 43 | ||
| 44 | const struct cred *dns_resolver_cache; | 44 | const struct cred *dns_resolver_cache; |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 7dc9de8444a9..4c6ba0fb2630 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
| @@ -1434,7 +1434,7 @@ static const struct file_operations arp_seq_fops = { | |||
| 1434 | 1434 | ||
| 1435 | static int __net_init arp_net_init(struct net *net) | 1435 | static int __net_init arp_net_init(struct net *net) |
| 1436 | { | 1436 | { |
| 1437 | if (!proc_create("arp", S_IRUGO, net->proc_net, &arp_seq_fops)) | 1437 | if (!proc_create("arp", 0444, net->proc_net, &arp_seq_fops)) |
| 1438 | return -ENOMEM; | 1438 | return -ENOMEM; |
| 1439 | return 0; | 1439 | return 0; |
| 1440 | } | 1440 | } |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 62243a8abf92..fac0b73e24d1 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
| @@ -2722,14 +2722,14 @@ static const struct file_operations fib_route_fops = { | |||
| 2722 | 2722 | ||
| 2723 | int __net_init fib_proc_init(struct net *net) | 2723 | int __net_init fib_proc_init(struct net *net) |
| 2724 | { | 2724 | { |
| 2725 | if (!proc_create("fib_trie", S_IRUGO, net->proc_net, &fib_trie_fops)) | 2725 | if (!proc_create("fib_trie", 0444, net->proc_net, &fib_trie_fops)) |
| 2726 | goto out1; | 2726 | goto out1; |
| 2727 | 2727 | ||
| 2728 | if (!proc_create("fib_triestat", S_IRUGO, net->proc_net, | 2728 | if (!proc_create("fib_triestat", 0444, net->proc_net, |
| 2729 | &fib_triestat_fops)) | 2729 | &fib_triestat_fops)) |
| 2730 | goto out2; | 2730 | goto out2; |
| 2731 | 2731 | ||
| 2732 | if (!proc_create("route", S_IRUGO, net->proc_net, &fib_route_fops)) | 2732 | if (!proc_create("route", 0444, net->proc_net, &fib_route_fops)) |
| 2733 | goto out3; | 2733 | goto out3; |
| 2734 | 2734 | ||
| 2735 | return 0; | 2735 | return 0; |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index c2743763777e..f17cd83ba164 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
| @@ -2993,10 +2993,10 @@ static int __net_init igmp_net_init(struct net *net) | |||
| 2993 | struct proc_dir_entry *pde; | 2993 | struct proc_dir_entry *pde; |
| 2994 | int err; | 2994 | int err; |
| 2995 | 2995 | ||
| 2996 | pde = proc_create("igmp", S_IRUGO, net->proc_net, &igmp_mc_seq_fops); | 2996 | pde = proc_create("igmp", 0444, net->proc_net, &igmp_mc_seq_fops); |
| 2997 | if (!pde) | 2997 | if (!pde) |
| 2998 | goto out_igmp; | 2998 | goto out_igmp; |
| 2999 | pde = proc_create("mcfilter", S_IRUGO, net->proc_net, | 2999 | pde = proc_create("mcfilter", 0444, net->proc_net, |
| 3000 | &igmp_mcf_seq_fops); | 3000 | &igmp_mcf_seq_fops); |
| 3001 | if (!pde) | 3001 | if (!pde) |
| 3002 | goto out_mcfilter; | 3002 | goto out_mcfilter; |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index f75802ad960f..43f620feb1c4 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
| @@ -1369,7 +1369,7 @@ static int __init ip_auto_config(void) | |||
| 1369 | unsigned int i; | 1369 | unsigned int i; |
| 1370 | 1370 | ||
| 1371 | #ifdef CONFIG_PROC_FS | 1371 | #ifdef CONFIG_PROC_FS |
| 1372 | proc_create("pnp", S_IRUGO, init_net.proc_net, &pnp_seq_fops); | 1372 | proc_create("pnp", 0444, init_net.proc_net, &pnp_seq_fops); |
| 1373 | #endif /* CONFIG_PROC_FS */ | 1373 | #endif /* CONFIG_PROC_FS */ |
| 1374 | 1374 | ||
| 1375 | if (!ic_enable) | 1375 | if (!ic_enable) |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 0fc88fa7a4dc..31b4cca588d0 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
| @@ -250,7 +250,7 @@ clusterip_config_init(struct net *net, const struct ipt_clusterip_tgt_info *i, | |||
| 250 | 250 | ||
| 251 | /* create proc dir entry */ | 251 | /* create proc dir entry */ |
| 252 | sprintf(buffer, "%pI4", &ip); | 252 | sprintf(buffer, "%pI4", &ip); |
| 253 | c->pde = proc_create_data(buffer, S_IWUSR|S_IRUSR, | 253 | c->pde = proc_create_data(buffer, 0600, |
| 254 | cn->procdir, | 254 | cn->procdir, |
| 255 | &clusterip_proc_fops, c); | 255 | &clusterip_proc_fops, c); |
| 256 | if (!c->pde) { | 256 | if (!c->pde) { |
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 0164def9c808..1f24bc8273a0 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
| @@ -1177,7 +1177,7 @@ static struct ping_seq_afinfo ping_v4_seq_afinfo = { | |||
| 1177 | int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo) | 1177 | int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo) |
| 1178 | { | 1178 | { |
| 1179 | struct proc_dir_entry *p; | 1179 | struct proc_dir_entry *p; |
| 1180 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, | 1180 | p = proc_create_data(afinfo->name, 0444, net->proc_net, |
| 1181 | afinfo->seq_fops, afinfo); | 1181 | afinfo->seq_fops, afinfo); |
| 1182 | if (!p) | 1182 | if (!p) |
| 1183 | return -ENOMEM; | 1183 | return -ENOMEM; |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index d97e83b2dd33..80de2e659dcb 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
| @@ -521,12 +521,12 @@ static const struct file_operations netstat_seq_fops = { | |||
| 521 | 521 | ||
| 522 | static __net_init int ip_proc_init_net(struct net *net) | 522 | static __net_init int ip_proc_init_net(struct net *net) |
| 523 | { | 523 | { |
| 524 | if (!proc_create("sockstat", S_IRUGO, net->proc_net, | 524 | if (!proc_create("sockstat", 0444, net->proc_net, |
| 525 | &sockstat_seq_fops)) | 525 | &sockstat_seq_fops)) |
| 526 | goto out_sockstat; | 526 | goto out_sockstat; |
| 527 | if (!proc_create("netstat", S_IRUGO, net->proc_net, &netstat_seq_fops)) | 527 | if (!proc_create("netstat", 0444, net->proc_net, &netstat_seq_fops)) |
| 528 | goto out_netstat; | 528 | goto out_netstat; |
| 529 | if (!proc_create("snmp", S_IRUGO, net->proc_net, &snmp_seq_fops)) | 529 | if (!proc_create("snmp", 0444, net->proc_net, &snmp_seq_fops)) |
| 530 | goto out_snmp; | 530 | goto out_snmp; |
| 531 | 531 | ||
| 532 | return 0; | 532 | return 0; |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 720bef7da2f6..0ee2501a9027 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
| @@ -1140,7 +1140,7 @@ static const struct file_operations raw_seq_fops = { | |||
| 1140 | 1140 | ||
| 1141 | static __net_init int raw_init_net(struct net *net) | 1141 | static __net_init int raw_init_net(struct net *net) |
| 1142 | { | 1142 | { |
| 1143 | if (!proc_create("raw", S_IRUGO, net->proc_net, &raw_seq_fops)) | 1143 | if (!proc_create("raw", 0444, net->proc_net, &raw_seq_fops)) |
| 1144 | return -ENOMEM; | 1144 | return -ENOMEM; |
| 1145 | 1145 | ||
| 1146 | return 0; | 1146 | return 0; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4ac5728689f5..ce9bd5380d21 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -379,12 +379,12 @@ static int __net_init ip_rt_do_proc_init(struct net *net) | |||
| 379 | { | 379 | { |
| 380 | struct proc_dir_entry *pde; | 380 | struct proc_dir_entry *pde; |
| 381 | 381 | ||
| 382 | pde = proc_create("rt_cache", S_IRUGO, net->proc_net, | 382 | pde = proc_create("rt_cache", 0444, net->proc_net, |
| 383 | &rt_cache_seq_fops); | 383 | &rt_cache_seq_fops); |
| 384 | if (!pde) | 384 | if (!pde) |
| 385 | goto err1; | 385 | goto err1; |
| 386 | 386 | ||
| 387 | pde = proc_create("rt_cache", S_IRUGO, | 387 | pde = proc_create("rt_cache", 0444, |
| 388 | net->proc_net_stat, &rt_cpu_seq_fops); | 388 | net->proc_net_stat, &rt_cpu_seq_fops); |
| 389 | if (!pde) | 389 | if (!pde) |
| 390 | goto err2; | 390 | goto err2; |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 2c6aec2643e8..fec8b1fd7b63 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
| @@ -2215,7 +2215,7 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) | |||
| 2215 | afinfo->seq_ops.next = tcp_seq_next; | 2215 | afinfo->seq_ops.next = tcp_seq_next; |
| 2216 | afinfo->seq_ops.stop = tcp_seq_stop; | 2216 | afinfo->seq_ops.stop = tcp_seq_stop; |
| 2217 | 2217 | ||
| 2218 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, | 2218 | p = proc_create_data(afinfo->name, 0444, net->proc_net, |
| 2219 | afinfo->seq_fops, afinfo); | 2219 | afinfo->seq_fops, afinfo); |
| 2220 | if (!p) | 2220 | if (!p) |
| 2221 | rc = -ENOMEM; | 2221 | rc = -ENOMEM; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index c6dc019bc64b..fb8f3a36bd14 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
| @@ -2673,7 +2673,7 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo) | |||
| 2673 | afinfo->seq_ops.next = udp_seq_next; | 2673 | afinfo->seq_ops.next = udp_seq_next; |
| 2674 | afinfo->seq_ops.stop = udp_seq_stop; | 2674 | afinfo->seq_ops.stop = udp_seq_stop; |
| 2675 | 2675 | ||
| 2676 | p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, | 2676 | p = proc_create_data(afinfo->name, 0444, net->proc_net, |
| 2677 | afinfo->seq_fops, afinfo); | 2677 | afinfo->seq_fops, afinfo); |
| 2678 | if (!p) | 2678 | if (!p) |
| 2679 | rc = -ENOMEM; | 2679 | rc = -ENOMEM; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6fd4bbdc444f..9ca90cd9fba4 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -4281,7 +4281,7 @@ static const struct file_operations if6_fops = { | |||
| 4281 | 4281 | ||
| 4282 | static int __net_init if6_proc_net_init(struct net *net) | 4282 | static int __net_init if6_proc_net_init(struct net *net) |
| 4283 | { | 4283 | { |
| 4284 | if (!proc_create("if_inet6", S_IRUGO, net->proc_net, &if6_fops)) | 4284 | if (!proc_create("if_inet6", 0444, net->proc_net, &if6_fops)) |
| 4285 | return -ENOMEM; | 4285 | return -ENOMEM; |
| 4286 | return 0; | 4286 | return 0; |
| 4287 | } | 4287 | } |
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index d580d4d456a5..bbcabbba9bd8 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
| @@ -544,7 +544,7 @@ static const struct file_operations ac6_seq_fops = { | |||
| 544 | 544 | ||
| 545 | int __net_init ac6_proc_init(struct net *net) | 545 | int __net_init ac6_proc_init(struct net *net) |
| 546 | { | 546 | { |
| 547 | if (!proc_create("anycast6", S_IRUGO, net->proc_net, &ac6_seq_fops)) | 547 | if (!proc_create("anycast6", 0444, net->proc_net, &ac6_seq_fops)) |
| 548 | return -ENOMEM; | 548 | return -ENOMEM; |
| 549 | 549 | ||
| 550 | return 0; | 550 | return 0; |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 6ddf52282894..f75b06ba8325 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
| @@ -844,7 +844,7 @@ static const struct file_operations ip6fl_seq_fops = { | |||
| 844 | 844 | ||
| 845 | static int __net_init ip6_flowlabel_proc_init(struct net *net) | 845 | static int __net_init ip6_flowlabel_proc_init(struct net *net) |
| 846 | { | 846 | { |
| 847 | if (!proc_create("ip6_flowlabel", S_IRUGO, net->proc_net, | 847 | if (!proc_create("ip6_flowlabel", 0444, net->proc_net, |
| 848 | &ip6fl_seq_fops)) | 848 | &ip6fl_seq_fops)) |
| 849 | return -ENOMEM; | 849 | return -ENOMEM; |
| 850 | return 0; | 850 | return 0; |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index d1a0cefac273..1e4c2b6ebd78 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
| @@ -2921,9 +2921,9 @@ static int __net_init igmp6_proc_init(struct net *net) | |||
| 2921 | int err; | 2921 | int err; |
| 2922 | 2922 | ||
| 2923 | err = -ENOMEM; | 2923 | err = -ENOMEM; |
| 2924 | if (!proc_create("igmp6", S_IRUGO, net->proc_net, &igmp6_mc_seq_fops)) | 2924 | if (!proc_create("igmp6", 0444, net->proc_net, &igmp6_mc_seq_fops)) |
| 2925 | goto out; | 2925 | goto out; |
| 2926 | if (!proc_create("mcfilter6", S_IRUGO, net->proc_net, | 2926 | if (!proc_create("mcfilter6", 0444, net->proc_net, |
| 2927 | &igmp6_mcf_seq_fops)) | 2927 | &igmp6_mcf_seq_fops)) |
| 2928 | goto out_proc_net_igmp6; | 2928 | goto out_proc_net_igmp6; |
| 2929 | 2929 | ||
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 1678cf037688..f9891fa672f3 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
| @@ -290,7 +290,7 @@ int snmp6_register_dev(struct inet6_dev *idev) | |||
| 290 | if (!net->mib.proc_net_devsnmp6) | 290 | if (!net->mib.proc_net_devsnmp6) |
| 291 | return -ENOENT; | 291 | return -ENOENT; |
| 292 | 292 | ||
| 293 | p = proc_create_data(idev->dev->name, S_IRUGO, | 293 | p = proc_create_data(idev->dev->name, 0444, |
| 294 | net->mib.proc_net_devsnmp6, | 294 | net->mib.proc_net_devsnmp6, |
| 295 | &snmp6_dev_seq_fops, idev); | 295 | &snmp6_dev_seq_fops, idev); |
| 296 | if (!p) | 296 | if (!p) |
| @@ -314,11 +314,11 @@ int snmp6_unregister_dev(struct inet6_dev *idev) | |||
| 314 | 314 | ||
| 315 | static int __net_init ipv6_proc_init_net(struct net *net) | 315 | static int __net_init ipv6_proc_init_net(struct net *net) |
| 316 | { | 316 | { |
| 317 | if (!proc_create("sockstat6", S_IRUGO, net->proc_net, | 317 | if (!proc_create("sockstat6", 0444, net->proc_net, |
| 318 | &sockstat6_seq_fops)) | 318 | &sockstat6_seq_fops)) |
| 319 | return -ENOMEM; | 319 | return -ENOMEM; |
| 320 | 320 | ||
| 321 | if (!proc_create("snmp6", S_IRUGO, net->proc_net, &snmp6_seq_fops)) | 321 | if (!proc_create("snmp6", 0444, net->proc_net, &snmp6_seq_fops)) |
| 322 | goto proc_snmp6_fail; | 322 | goto proc_snmp6_fail; |
| 323 | 323 | ||
| 324 | net->mib.proc_net_devsnmp6 = proc_mkdir("dev_snmp6", net->proc_net); | 324 | net->mib.proc_net_devsnmp6 = proc_mkdir("dev_snmp6", net->proc_net); |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 10a4ac4933b7..b5e5de732494 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
| @@ -1318,7 +1318,7 @@ static const struct file_operations raw6_seq_fops = { | |||
| 1318 | 1318 | ||
| 1319 | static int __net_init raw6_init_net(struct net *net) | 1319 | static int __net_init raw6_init_net(struct net *net) |
| 1320 | { | 1320 | { |
| 1321 | if (!proc_create("raw6", S_IRUGO, net->proc_net, &raw6_seq_fops)) | 1321 | if (!proc_create("raw6", 0444, net->proc_net, &raw6_seq_fops)) |
| 1322 | return -ENOMEM; | 1322 | return -ENOMEM; |
| 1323 | 1323 | ||
| 1324 | return 0; | 1324 | return 0; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a2ed9fdd58d4..1d0eaa69874d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -5067,7 +5067,7 @@ static int __net_init ip6_route_net_init_late(struct net *net) | |||
| 5067 | { | 5067 | { |
| 5068 | #ifdef CONFIG_PROC_FS | 5068 | #ifdef CONFIG_PROC_FS |
| 5069 | proc_create("ipv6_route", 0, net->proc_net, &ipv6_route_proc_fops); | 5069 | proc_create("ipv6_route", 0, net->proc_net, &ipv6_route_proc_fops); |
| 5070 | proc_create("rt6_stats", S_IRUGO, net->proc_net, &rt6_stats_seq_fops); | 5070 | proc_create("rt6_stats", 0444, net->proc_net, &rt6_stats_seq_fops); |
| 5071 | #endif | 5071 | #endif |
| 5072 | return 0; | 5072 | return 0; |
| 5073 | } | 5073 | } |
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c index 2c1c8b3e4452..4c2e9907f254 100644 --- a/net/kcm/kcmproc.c +++ b/net/kcm/kcmproc.c | |||
| @@ -269,7 +269,7 @@ static int kcm_proc_register(struct net *net, struct kcm_seq_muxinfo *muxinfo) | |||
| 269 | struct proc_dir_entry *p; | 269 | struct proc_dir_entry *p; |
| 270 | int rc = 0; | 270 | int rc = 0; |
| 271 | 271 | ||
| 272 | p = proc_create_data(muxinfo->name, S_IRUGO, net->proc_net, | 272 | p = proc_create_data(muxinfo->name, 0444, net->proc_net, |
| 273 | muxinfo->seq_fops, muxinfo); | 273 | muxinfo->seq_fops, muxinfo); |
| 274 | if (!p) | 274 | if (!p) |
| 275 | rc = -ENOMEM; | 275 | rc = -ENOMEM; |
| @@ -406,7 +406,7 @@ static int kcm_proc_init_net(struct net *net) | |||
| 406 | { | 406 | { |
| 407 | int err; | 407 | int err; |
| 408 | 408 | ||
| 409 | if (!proc_create("kcm_stats", S_IRUGO, net->proc_net, | 409 | if (!proc_create("kcm_stats", 0444, net->proc_net, |
| 410 | &kcm_stats_seq_fops)) { | 410 | &kcm_stats_seq_fops)) { |
| 411 | err = -ENOMEM; | 411 | err = -ENOMEM; |
| 412 | goto out_kcm_stats; | 412 | goto out_kcm_stats; |
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index 977bca659787..f24504efe729 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c | |||
| @@ -1742,7 +1742,7 @@ static __net_init int pppol2tp_init_net(struct net *net) | |||
| 1742 | struct proc_dir_entry *pde; | 1742 | struct proc_dir_entry *pde; |
| 1743 | int err = 0; | 1743 | int err = 0; |
| 1744 | 1744 | ||
| 1745 | pde = proc_create("pppol2tp", S_IRUGO, net->proc_net, | 1745 | pde = proc_create("pppol2tp", 0444, net->proc_net, |
| 1746 | &pppol2tp_proc_fops); | 1746 | &pppol2tp_proc_fops); |
| 1747 | if (!pde) { | 1747 | if (!pde) { |
| 1748 | err = -ENOMEM; | 1748 | err = -ENOMEM; |
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 66821e8a2b7a..62ea0aed94b4 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c | |||
| @@ -249,11 +249,11 @@ int __init llc_proc_init(void) | |||
| 249 | if (!llc_proc_dir) | 249 | if (!llc_proc_dir) |
| 250 | goto out; | 250 | goto out; |
| 251 | 251 | ||
| 252 | p = proc_create("socket", S_IRUGO, llc_proc_dir, &llc_seq_socket_fops); | 252 | p = proc_create("socket", 0444, llc_proc_dir, &llc_seq_socket_fops); |
| 253 | if (!p) | 253 | if (!p) |
| 254 | goto out_socket; | 254 | goto out_socket; |
| 255 | 255 | ||
| 256 | p = proc_create("core", S_IRUGO, llc_proc_dir, &llc_seq_core_fops); | 256 | p = proc_create("core", 0444, llc_proc_dir, &llc_seq_core_fops); |
| 257 | if (!p) | 257 | if (!p) |
| 258 | goto out_core; | 258 | goto out_core; |
| 259 | 259 | ||
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 9766c1cc4b0a..8221bc5582ab 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
| @@ -690,7 +690,7 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) | |||
| 690 | #ifdef CONFIG_MAC80211_DEBUGFS | 690 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 691 | mp->fixed_rate_idx = (u32) -1; | 691 | mp->fixed_rate_idx = (u32) -1; |
| 692 | mp->dbg_fixed_rate = debugfs_create_u32("fixed_rate_idx", | 692 | mp->dbg_fixed_rate = debugfs_create_u32("fixed_rate_idx", |
| 693 | S_IRUGO | S_IWUGO, debugfsdir, &mp->fixed_rate_idx); | 693 | 0666, debugfsdir, &mp->fixed_rate_idx); |
| 694 | #endif | 694 | #endif |
| 695 | 695 | ||
| 696 | minstrel_init_cck_rates(mp); | 696 | minstrel_init_cck_rates(mp); |
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c index 36fc971deb86..9ad7d63d3e5b 100644 --- a/net/mac80211/rc80211_minstrel_debugfs.c +++ b/net/mac80211/rc80211_minstrel_debugfs.c | |||
| @@ -214,11 +214,11 @@ minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir) | |||
| 214 | { | 214 | { |
| 215 | struct minstrel_sta_info *mi = priv_sta; | 215 | struct minstrel_sta_info *mi = priv_sta; |
| 216 | 216 | ||
| 217 | mi->dbg_stats = debugfs_create_file("rc_stats", S_IRUGO, dir, mi, | 217 | mi->dbg_stats = debugfs_create_file("rc_stats", 0444, dir, mi, |
| 218 | &minstrel_stat_fops); | 218 | &minstrel_stat_fops); |
| 219 | 219 | ||
| 220 | mi->dbg_stats_csv = debugfs_create_file("rc_stats_csv", S_IRUGO, dir, | 220 | mi->dbg_stats_csv = debugfs_create_file("rc_stats_csv", 0444, dir, mi, |
| 221 | mi, &minstrel_stat_csv_fops); | 221 | &minstrel_stat_csv_fops); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | void | 224 | void |
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c index 7d969e300fb3..bfcc03152dc6 100644 --- a/net/mac80211/rc80211_minstrel_ht_debugfs.c +++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c | |||
| @@ -303,10 +303,10 @@ minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir) | |||
| 303 | { | 303 | { |
| 304 | struct minstrel_ht_sta_priv *msp = priv_sta; | 304 | struct minstrel_ht_sta_priv *msp = priv_sta; |
| 305 | 305 | ||
| 306 | msp->dbg_stats = debugfs_create_file("rc_stats", S_IRUGO, dir, msp, | 306 | msp->dbg_stats = debugfs_create_file("rc_stats", 0444, dir, msp, |
| 307 | &minstrel_ht_stat_fops); | 307 | &minstrel_ht_stat_fops); |
| 308 | msp->dbg_stats_csv = debugfs_create_file("rc_stats_csv", S_IRUGO, | 308 | msp->dbg_stats_csv = debugfs_create_file("rc_stats_csv", 0444, dir, msp, |
| 309 | dir, msp, &minstrel_ht_stat_csv_fops); | 309 | &minstrel_ht_stat_csv_fops); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | void | 312 | void |
diff --git a/net/netfilter/nf_conntrack_netbios_ns.c b/net/netfilter/nf_conntrack_netbios_ns.c index 496ce173f0c1..cc11bf890eb9 100644 --- a/net/netfilter/nf_conntrack_netbios_ns.c +++ b/net/netfilter/nf_conntrack_netbios_ns.c | |||
| @@ -33,7 +33,7 @@ MODULE_ALIAS("ip_conntrack_netbios_ns"); | |||
| 33 | MODULE_ALIAS_NFCT_HELPER("netbios_ns"); | 33 | MODULE_ALIAS_NFCT_HELPER("netbios_ns"); |
| 34 | 34 | ||
| 35 | static unsigned int timeout __read_mostly = 3; | 35 | static unsigned int timeout __read_mostly = 3; |
| 36 | module_param(timeout, uint, S_IRUSR); | 36 | module_param(timeout, uint, 0400); |
| 37 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); | 37 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); |
| 38 | 38 | ||
| 39 | static struct nf_conntrack_expect_policy exp_policy = { | 39 | static struct nf_conntrack_expect_policy exp_policy = { |
diff --git a/net/netfilter/nf_conntrack_snmp.c b/net/netfilter/nf_conntrack_snmp.c index 87b95a2c270c..1b18f43ad226 100644 --- a/net/netfilter/nf_conntrack_snmp.c +++ b/net/netfilter/nf_conntrack_snmp.c | |||
| @@ -26,7 +26,7 @@ MODULE_LICENSE("GPL"); | |||
| 26 | MODULE_ALIAS_NFCT_HELPER("snmp"); | 26 | MODULE_ALIAS_NFCT_HELPER("snmp"); |
| 27 | 27 | ||
| 28 | static unsigned int timeout __read_mostly = 30; | 28 | static unsigned int timeout __read_mostly = 30; |
| 29 | module_param(timeout, uint, S_IRUSR); | 29 | module_param(timeout, uint, 0400); |
| 30 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); | 30 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); |
| 31 | 31 | ||
| 32 | int (*nf_nat_snmp_hook)(struct sk_buff *skb, | 32 | int (*nf_nat_snmp_hook)(struct sk_buff *skb, |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 3cdce391362e..98844c87d01e 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
| @@ -495,7 +495,7 @@ static int nf_conntrack_standalone_init_proc(struct net *net) | |||
| 495 | if (uid_valid(root_uid) && gid_valid(root_gid)) | 495 | if (uid_valid(root_uid) && gid_valid(root_gid)) |
| 496 | proc_set_user(pde, root_uid, root_gid); | 496 | proc_set_user(pde, root_uid, root_gid); |
| 497 | 497 | ||
| 498 | pde = proc_create("nf_conntrack", S_IRUGO, net->proc_net_stat, | 498 | pde = proc_create("nf_conntrack", 0444, net->proc_net_stat, |
| 499 | &ct_cpu_seq_fops); | 499 | &ct_cpu_seq_fops); |
| 500 | if (!pde) | 500 | if (!pde) |
| 501 | goto out_stat_nf_conntrack; | 501 | goto out_stat_nf_conntrack; |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 1ba3da51050d..a964e4d356cc 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
| @@ -549,7 +549,7 @@ static int __net_init nf_log_net_init(struct net *net) | |||
| 549 | int ret = -ENOMEM; | 549 | int ret = -ENOMEM; |
| 550 | 550 | ||
| 551 | #ifdef CONFIG_PROC_FS | 551 | #ifdef CONFIG_PROC_FS |
| 552 | if (!proc_create("nf_log", S_IRUGO, | 552 | if (!proc_create("nf_log", 0444, |
| 553 | net->nf.proc_netfilter, &nflog_file_ops)) | 553 | net->nf.proc_netfilter, &nflog_file_ops)) |
| 554 | return ret; | 554 | return ret; |
| 555 | #endif | 555 | #endif |
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c index 64b875e452ca..8f16fd27132d 100644 --- a/net/netfilter/nf_synproxy_core.c +++ b/net/netfilter/nf_synproxy_core.c | |||
| @@ -325,7 +325,7 @@ static const struct file_operations synproxy_cpu_seq_fops = { | |||
| 325 | 325 | ||
| 326 | static int __net_init synproxy_proc_init(struct net *net) | 326 | static int __net_init synproxy_proc_init(struct net *net) |
| 327 | { | 327 | { |
| 328 | if (!proc_create("synproxy", S_IRUGO, net->proc_net_stat, | 328 | if (!proc_create("synproxy", 0444, net->proc_net_stat, |
| 329 | &synproxy_cpu_seq_fops)) | 329 | &synproxy_cpu_seq_fops)) |
| 330 | return -ENOMEM; | 330 | return -ENOMEM; |
| 331 | return 0; | 331 | return 0; |
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 1ac6600bfafd..5ee859193783 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c | |||
| @@ -132,7 +132,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) | |||
| 132 | ret = -ENOMEM; | 132 | ret = -ENOMEM; |
| 133 | goto out_free_timer; | 133 | goto out_free_timer; |
| 134 | } | 134 | } |
| 135 | info->timer->attr.attr.mode = S_IRUGO; | 135 | info->timer->attr.attr.mode = 0444; |
| 136 | info->timer->attr.show = idletimer_tg_show; | 136 | info->timer->attr.show = idletimer_tg_show; |
| 137 | 137 | ||
| 138 | ret = sysfs_create_file(idletimer_tg_kobj, &info->timer->attr.attr); | 138 | ret = sysfs_create_file(idletimer_tg_kobj, &info->timer->attr.attr); |
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 486dd24da78b..434e35ce940b 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c | |||
| @@ -51,8 +51,8 @@ static unsigned int ip_list_gid __read_mostly; | |||
| 51 | module_param(ip_list_tot, uint, 0400); | 51 | module_param(ip_list_tot, uint, 0400); |
| 52 | module_param(ip_list_hash_size, uint, 0400); | 52 | module_param(ip_list_hash_size, uint, 0400); |
| 53 | module_param(ip_list_perms, uint, 0400); | 53 | module_param(ip_list_perms, uint, 0400); |
| 54 | module_param(ip_list_uid, uint, S_IRUGO | S_IWUSR); | 54 | module_param(ip_list_uid, uint, 0644); |
| 55 | module_param(ip_list_gid, uint, S_IRUGO | S_IWUSR); | 55 | module_param(ip_list_gid, uint, 0644); |
| 56 | MODULE_PARM_DESC(ip_list_tot, "number of IPs to remember per list"); | 56 | MODULE_PARM_DESC(ip_list_tot, "number of IPs to remember per list"); |
| 57 | MODULE_PARM_DESC(ip_list_hash_size, "size of hash table used to look up IPs"); | 57 | MODULE_PARM_DESC(ip_list_hash_size, "size of hash table used to look up IPs"); |
| 58 | MODULE_PARM_DESC(ip_list_perms, "permissions on /proc/net/xt_recent/* files"); | 58 | MODULE_PARM_DESC(ip_list_perms, "permissions on /proc/net/xt_recent/* files"); |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 35bb6807927f..4221d98a314b 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
| @@ -1450,9 +1450,9 @@ static int __init nr_proto_init(void) | |||
| 1450 | 1450 | ||
| 1451 | nr_loopback_init(); | 1451 | nr_loopback_init(); |
| 1452 | 1452 | ||
| 1453 | proc_create("nr", S_IRUGO, init_net.proc_net, &nr_info_fops); | 1453 | proc_create("nr", 0444, init_net.proc_net, &nr_info_fops); |
| 1454 | proc_create("nr_neigh", S_IRUGO, init_net.proc_net, &nr_neigh_fops); | 1454 | proc_create("nr_neigh", 0444, init_net.proc_net, &nr_neigh_fops); |
| 1455 | proc_create("nr_nodes", S_IRUGO, init_net.proc_net, &nr_nodes_fops); | 1455 | proc_create("nr_nodes", 0444, init_net.proc_net, &nr_nodes_fops); |
| 1456 | out: | 1456 | out: |
| 1457 | return rc; | 1457 | return rc; |
| 1458 | fail: | 1458 | fail: |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 5170373b797c..9ff5e0a76593 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
| @@ -1567,12 +1567,12 @@ static int __init rose_proto_init(void) | |||
| 1567 | 1567 | ||
| 1568 | rose_add_loopback_neigh(); | 1568 | rose_add_loopback_neigh(); |
| 1569 | 1569 | ||
| 1570 | proc_create("rose", S_IRUGO, init_net.proc_net, &rose_info_fops); | 1570 | proc_create("rose", 0444, init_net.proc_net, &rose_info_fops); |
| 1571 | proc_create("rose_neigh", S_IRUGO, init_net.proc_net, | 1571 | proc_create("rose_neigh", 0444, init_net.proc_net, |
| 1572 | &rose_neigh_fops); | 1572 | &rose_neigh_fops); |
| 1573 | proc_create("rose_nodes", S_IRUGO, init_net.proc_net, | 1573 | proc_create("rose_nodes", 0444, init_net.proc_net, |
| 1574 | &rose_nodes_fops); | 1574 | &rose_nodes_fops); |
| 1575 | proc_create("rose_routes", S_IRUGO, init_net.proc_net, | 1575 | proc_create("rose_routes", 0444, init_net.proc_net, |
| 1576 | &rose_routes_fops); | 1576 | &rose_routes_fops); |
| 1577 | out: | 1577 | out: |
| 1578 | return rc; | 1578 | return rc; |
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 0c9c18aa7c77..9e1c2c6b6a67 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
| @@ -32,7 +32,7 @@ MODULE_LICENSE("GPL"); | |||
| 32 | MODULE_ALIAS_NETPROTO(PF_RXRPC); | 32 | MODULE_ALIAS_NETPROTO(PF_RXRPC); |
| 33 | 33 | ||
| 34 | unsigned int rxrpc_debug; // = RXRPC_DEBUG_KPROTO; | 34 | unsigned int rxrpc_debug; // = RXRPC_DEBUG_KPROTO; |
| 35 | module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); | 35 | module_param_named(debug, rxrpc_debug, uint, 0644); |
| 36 | MODULE_PARM_DESC(debug, "RxRPC debugging mask"); | 36 | MODULE_PARM_DESC(debug, "RxRPC debugging mask"); |
| 37 | 37 | ||
| 38 | static struct proto rxrpc_proto; | 38 | static struct proto rxrpc_proto; |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 17d0155d9de3..1d9ccc6dab2b 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
| @@ -450,17 +450,17 @@ int __net_init sctp_proc_init(struct net *net) | |||
| 450 | net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net); | 450 | net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net); |
| 451 | if (!net->sctp.proc_net_sctp) | 451 | if (!net->sctp.proc_net_sctp) |
| 452 | return -ENOMEM; | 452 | return -ENOMEM; |
| 453 | if (!proc_create("snmp", S_IRUGO, net->sctp.proc_net_sctp, | 453 | if (!proc_create("snmp", 0444, net->sctp.proc_net_sctp, |
| 454 | &sctp_snmp_seq_fops)) | 454 | &sctp_snmp_seq_fops)) |
| 455 | goto cleanup; | 455 | goto cleanup; |
| 456 | if (!proc_create("eps", S_IRUGO, net->sctp.proc_net_sctp, | 456 | if (!proc_create("eps", 0444, net->sctp.proc_net_sctp, |
| 457 | &sctp_eps_seq_fops)) | 457 | &sctp_eps_seq_fops)) |
| 458 | goto cleanup; | 458 | goto cleanup; |
| 459 | if (!proc_create("assocs", S_IRUGO, net->sctp.proc_net_sctp, | 459 | if (!proc_create("assocs", 0444, net->sctp.proc_net_sctp, |
| 460 | &sctp_assocs_seq_fops)) | 460 | &sctp_assocs_seq_fops)) |
| 461 | goto cleanup; | 461 | goto cleanup; |
| 462 | if (!proc_create("remaddr", S_IRUGO, net->sctp.proc_net_sctp, | 462 | if (!proc_create("remaddr", 0444, net->sctp.proc_net_sctp, |
| 463 | &sctp_remaddr_seq_fops)) | 463 | &sctp_remaddr_seq_fops)) |
| 464 | goto cleanup; | 464 | goto cleanup; |
| 465 | return 0; | 465 | return 0; |
| 466 | 466 | ||
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 26531193fce4..5089dbb96d58 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
| @@ -1375,7 +1375,7 @@ static int create_use_gss_proxy_proc_entry(struct net *net) | |||
| 1375 | struct proc_dir_entry **p = &sn->use_gssp_proc; | 1375 | struct proc_dir_entry **p = &sn->use_gssp_proc; |
| 1376 | 1376 | ||
| 1377 | sn->use_gss_proxy = -1; | 1377 | sn->use_gss_proxy = -1; |
| 1378 | *p = proc_create_data("use-gss-proxy", S_IFREG|S_IRUSR|S_IWUSR, | 1378 | *p = proc_create_data("use-gss-proxy", S_IFREG | 0600, |
| 1379 | sn->proc_net_rpc, | 1379 | sn->proc_net_rpc, |
| 1380 | &use_gss_proxy_ops, net); | 1380 | &use_gss_proxy_ops, net); |
| 1381 | if (!*p) | 1381 | if (!*p) |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 8a7e1c774f9c..c536cc24b3d1 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
| @@ -1621,20 +1621,20 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net) | |||
| 1621 | if (cd->procfs == NULL) | 1621 | if (cd->procfs == NULL) |
| 1622 | goto out_nomem; | 1622 | goto out_nomem; |
| 1623 | 1623 | ||
| 1624 | p = proc_create_data("flush", S_IFREG|S_IRUSR|S_IWUSR, | 1624 | p = proc_create_data("flush", S_IFREG | 0600, |
| 1625 | cd->procfs, &cache_flush_operations_procfs, cd); | 1625 | cd->procfs, &cache_flush_operations_procfs, cd); |
| 1626 | if (p == NULL) | 1626 | if (p == NULL) |
| 1627 | goto out_nomem; | 1627 | goto out_nomem; |
| 1628 | 1628 | ||
| 1629 | if (cd->cache_request || cd->cache_parse) { | 1629 | if (cd->cache_request || cd->cache_parse) { |
| 1630 | p = proc_create_data("channel", S_IFREG|S_IRUSR|S_IWUSR, | 1630 | p = proc_create_data("channel", S_IFREG | 0600, cd->procfs, |
| 1631 | cd->procfs, &cache_file_operations_procfs, cd); | 1631 | &cache_file_operations_procfs, cd); |
| 1632 | if (p == NULL) | 1632 | if (p == NULL) |
| 1633 | goto out_nomem; | 1633 | goto out_nomem; |
| 1634 | } | 1634 | } |
| 1635 | if (cd->cache_show) { | 1635 | if (cd->cache_show) { |
| 1636 | p = proc_create_data("content", S_IFREG|S_IRUSR, | 1636 | p = proc_create_data("content", S_IFREG | 0400, cd->procfs, |
| 1637 | cd->procfs, &content_file_operations_procfs, cd); | 1637 | &content_file_operations_procfs, cd); |
| 1638 | if (p == NULL) | 1638 | if (p == NULL) |
| 1639 | goto out_nomem; | 1639 | goto out_nomem; |
| 1640 | } | 1640 | } |
diff --git a/net/sunrpc/debugfs.c b/net/sunrpc/debugfs.c index e980d2a493de..45a033329cd4 100644 --- a/net/sunrpc/debugfs.c +++ b/net/sunrpc/debugfs.c | |||
| @@ -139,7 +139,7 @@ rpc_clnt_debugfs_register(struct rpc_clnt *clnt) | |||
| 139 | return; | 139 | return; |
| 140 | 140 | ||
| 141 | /* make tasks file */ | 141 | /* make tasks file */ |
| 142 | if (!debugfs_create_file("tasks", S_IFREG | S_IRUSR, clnt->cl_debugfs, | 142 | if (!debugfs_create_file("tasks", S_IFREG | 0400, clnt->cl_debugfs, |
| 143 | clnt, &tasks_fops)) | 143 | clnt, &tasks_fops)) |
| 144 | goto out_err; | 144 | goto out_err; |
| 145 | 145 | ||
| @@ -241,7 +241,7 @@ rpc_xprt_debugfs_register(struct rpc_xprt *xprt) | |||
| 241 | return; | 241 | return; |
| 242 | 242 | ||
| 243 | /* make tasks file */ | 243 | /* make tasks file */ |
| 244 | if (!debugfs_create_file("info", S_IFREG | S_IRUSR, xprt->debugfs, | 244 | if (!debugfs_create_file("info", S_IFREG | 0400, xprt->debugfs, |
| 245 | xprt, &xprt_info_fops)) { | 245 | xprt, &xprt_info_fops)) { |
| 246 | debugfs_remove_recursive(xprt->debugfs); | 246 | debugfs_remove_recursive(xprt->debugfs); |
| 247 | xprt->debugfs = NULL; | 247 | xprt->debugfs = NULL; |
| @@ -317,7 +317,7 @@ inject_fault_dir(struct dentry *topdir) | |||
| 317 | if (!faultdir) | 317 | if (!faultdir) |
| 318 | return NULL; | 318 | return NULL; |
| 319 | 319 | ||
| 320 | if (!debugfs_create_file("disconnect", S_IFREG | S_IRUSR, faultdir, | 320 | if (!debugfs_create_file("disconnect", S_IFREG | 0400, faultdir, |
| 321 | NULL, &fault_disconnect_fops)) | 321 | NULL, &fault_disconnect_fops)) |
| 322 | return NULL; | 322 | return NULL; |
| 323 | 323 | ||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index fc97fc3ed637..0f08934b2cea 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
| @@ -820,13 +820,13 @@ struct dentry *rpc_mkpipe_dentry(struct dentry *parent, const char *name, | |||
| 820 | { | 820 | { |
| 821 | struct dentry *dentry; | 821 | struct dentry *dentry; |
| 822 | struct inode *dir = d_inode(parent); | 822 | struct inode *dir = d_inode(parent); |
| 823 | umode_t umode = S_IFIFO | S_IRUSR | S_IWUSR; | 823 | umode_t umode = S_IFIFO | 0600; |
| 824 | int err; | 824 | int err; |
| 825 | 825 | ||
| 826 | if (pipe->ops->upcall == NULL) | 826 | if (pipe->ops->upcall == NULL) |
| 827 | umode &= ~S_IRUGO; | 827 | umode &= ~0444; |
| 828 | if (pipe->ops->downcall == NULL) | 828 | if (pipe->ops->downcall == NULL) |
| 829 | umode &= ~S_IWUGO; | 829 | umode &= ~0222; |
| 830 | 830 | ||
| 831 | inode_lock_nested(dir, I_MUTEX_PARENT); | 831 | inode_lock_nested(dir, I_MUTEX_PARENT); |
| 832 | dentry = __rpc_lookup_create_exclusive(parent, name); | 832 | dentry = __rpc_lookup_create_exclusive(parent, name); |
| @@ -1035,7 +1035,7 @@ static const struct rpc_filelist authfiles[] = { | |||
| 1035 | [RPCAUTH_info] = { | 1035 | [RPCAUTH_info] = { |
| 1036 | .name = "info", | 1036 | .name = "info", |
| 1037 | .i_fop = &rpc_info_operations, | 1037 | .i_fop = &rpc_info_operations, |
| 1038 | .mode = S_IFREG | S_IRUSR, | 1038 | .mode = S_IFREG | 0400, |
| 1039 | }, | 1039 | }, |
| 1040 | }; | 1040 | }; |
| 1041 | 1041 | ||
| @@ -1068,8 +1068,8 @@ struct dentry *rpc_create_client_dir(struct dentry *dentry, | |||
| 1068 | { | 1068 | { |
| 1069 | struct dentry *ret; | 1069 | struct dentry *ret; |
| 1070 | 1070 | ||
| 1071 | ret = rpc_mkdir_populate(dentry, name, S_IRUGO | S_IXUGO, NULL, | 1071 | ret = rpc_mkdir_populate(dentry, name, 0555, NULL, |
| 1072 | rpc_clntdir_populate, rpc_client); | 1072 | rpc_clntdir_populate, rpc_client); |
| 1073 | if (!IS_ERR(ret)) { | 1073 | if (!IS_ERR(ret)) { |
| 1074 | rpc_client->cl_pipedir_objects.pdh_dentry = ret; | 1074 | rpc_client->cl_pipedir_objects.pdh_dentry = ret; |
| 1075 | rpc_create_pipe_dir_objects(&rpc_client->cl_pipedir_objects); | 1075 | rpc_create_pipe_dir_objects(&rpc_client->cl_pipedir_objects); |
| @@ -1096,17 +1096,17 @@ static const struct rpc_filelist cache_pipefs_files[3] = { | |||
| 1096 | [0] = { | 1096 | [0] = { |
| 1097 | .name = "channel", | 1097 | .name = "channel", |
| 1098 | .i_fop = &cache_file_operations_pipefs, | 1098 | .i_fop = &cache_file_operations_pipefs, |
| 1099 | .mode = S_IFREG|S_IRUSR|S_IWUSR, | 1099 | .mode = S_IFREG | 0600, |
| 1100 | }, | 1100 | }, |
| 1101 | [1] = { | 1101 | [1] = { |
| 1102 | .name = "content", | 1102 | .name = "content", |
| 1103 | .i_fop = &content_file_operations_pipefs, | 1103 | .i_fop = &content_file_operations_pipefs, |
| 1104 | .mode = S_IFREG|S_IRUSR, | 1104 | .mode = S_IFREG | 0400, |
| 1105 | }, | 1105 | }, |
| 1106 | [2] = { | 1106 | [2] = { |
| 1107 | .name = "flush", | 1107 | .name = "flush", |
| 1108 | .i_fop = &cache_flush_operations_pipefs, | 1108 | .i_fop = &cache_flush_operations_pipefs, |
| 1109 | .mode = S_IFREG|S_IRUSR|S_IWUSR, | 1109 | .mode = S_IFREG | 0600, |
| 1110 | }, | 1110 | }, |
| 1111 | }; | 1111 | }; |
| 1112 | 1112 | ||
| @@ -1164,39 +1164,39 @@ enum { | |||
| 1164 | static const struct rpc_filelist files[] = { | 1164 | static const struct rpc_filelist files[] = { |
| 1165 | [RPCAUTH_lockd] = { | 1165 | [RPCAUTH_lockd] = { |
| 1166 | .name = "lockd", | 1166 | .name = "lockd", |
| 1167 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1167 | .mode = S_IFDIR | 0555, |
| 1168 | }, | 1168 | }, |
| 1169 | [RPCAUTH_mount] = { | 1169 | [RPCAUTH_mount] = { |
| 1170 | .name = "mount", | 1170 | .name = "mount", |
| 1171 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1171 | .mode = S_IFDIR | 0555, |
| 1172 | }, | 1172 | }, |
| 1173 | [RPCAUTH_nfs] = { | 1173 | [RPCAUTH_nfs] = { |
| 1174 | .name = "nfs", | 1174 | .name = "nfs", |
| 1175 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1175 | .mode = S_IFDIR | 0555, |
| 1176 | }, | 1176 | }, |
| 1177 | [RPCAUTH_portmap] = { | 1177 | [RPCAUTH_portmap] = { |
| 1178 | .name = "portmap", | 1178 | .name = "portmap", |
| 1179 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1179 | .mode = S_IFDIR | 0555, |
| 1180 | }, | 1180 | }, |
| 1181 | [RPCAUTH_statd] = { | 1181 | [RPCAUTH_statd] = { |
| 1182 | .name = "statd", | 1182 | .name = "statd", |
| 1183 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1183 | .mode = S_IFDIR | 0555, |
| 1184 | }, | 1184 | }, |
| 1185 | [RPCAUTH_nfsd4_cb] = { | 1185 | [RPCAUTH_nfsd4_cb] = { |
| 1186 | .name = "nfsd4_cb", | 1186 | .name = "nfsd4_cb", |
| 1187 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1187 | .mode = S_IFDIR | 0555, |
| 1188 | }, | 1188 | }, |
| 1189 | [RPCAUTH_cache] = { | 1189 | [RPCAUTH_cache] = { |
| 1190 | .name = "cache", | 1190 | .name = "cache", |
| 1191 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1191 | .mode = S_IFDIR | 0555, |
| 1192 | }, | 1192 | }, |
| 1193 | [RPCAUTH_nfsd] = { | 1193 | [RPCAUTH_nfsd] = { |
| 1194 | .name = "nfsd", | 1194 | .name = "nfsd", |
| 1195 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1195 | .mode = S_IFDIR | 0555, |
| 1196 | }, | 1196 | }, |
| 1197 | [RPCAUTH_gssd] = { | 1197 | [RPCAUTH_gssd] = { |
| 1198 | .name = "gssd", | 1198 | .name = "gssd", |
| 1199 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1199 | .mode = S_IFDIR | 0555, |
| 1200 | }, | 1200 | }, |
| 1201 | }; | 1201 | }; |
| 1202 | 1202 | ||
| @@ -1261,7 +1261,7 @@ EXPORT_SYMBOL_GPL(rpc_put_sb_net); | |||
| 1261 | static const struct rpc_filelist gssd_dummy_clnt_dir[] = { | 1261 | static const struct rpc_filelist gssd_dummy_clnt_dir[] = { |
| 1262 | [0] = { | 1262 | [0] = { |
| 1263 | .name = "clntXX", | 1263 | .name = "clntXX", |
| 1264 | .mode = S_IFDIR | S_IRUGO | S_IXUGO, | 1264 | .mode = S_IFDIR | 0555, |
| 1265 | }, | 1265 | }, |
| 1266 | }; | 1266 | }; |
| 1267 | 1267 | ||
| @@ -1310,7 +1310,7 @@ static const struct rpc_filelist gssd_dummy_info_file[] = { | |||
| 1310 | [0] = { | 1310 | [0] = { |
| 1311 | .name = "info", | 1311 | .name = "info", |
| 1312 | .i_fop = &rpc_dummy_info_operations, | 1312 | .i_fop = &rpc_dummy_info_operations, |
| 1313 | .mode = S_IFREG | S_IRUSR, | 1313 | .mode = S_IFREG | 0400, |
| 1314 | }, | 1314 | }, |
| 1315 | }; | 1315 | }; |
| 1316 | 1316 | ||
| @@ -1397,7 +1397,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent) | |||
| 1397 | sb->s_d_op = &simple_dentry_operations; | 1397 | sb->s_d_op = &simple_dentry_operations; |
| 1398 | sb->s_time_gran = 1; | 1398 | sb->s_time_gran = 1; |
| 1399 | 1399 | ||
| 1400 | inode = rpc_get_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO); | 1400 | inode = rpc_get_inode(sb, S_IFDIR | 0555); |
| 1401 | sb->s_root = root = d_make_root(inode); | 1401 | sb->s_root = root = d_make_root(inode); |
| 1402 | if (!root) | 1402 | if (!root) |
| 1403 | return -ENOMEM; | 1403 | return -ENOMEM; |
diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c index 5511f989ef47..b4c464594a5e 100644 --- a/net/wireless/wext-proc.c +++ b/net/wireless/wext-proc.c | |||
| @@ -142,7 +142,7 @@ static const struct file_operations wireless_seq_fops = { | |||
| 142 | int __net_init wext_proc_init(struct net *net) | 142 | int __net_init wext_proc_init(struct net *net) |
| 143 | { | 143 | { |
| 144 | /* Create /proc/net/wireless entry */ | 144 | /* Create /proc/net/wireless entry */ |
| 145 | if (!proc_create("wireless", S_IRUGO, net->proc_net, | 145 | if (!proc_create("wireless", 0444, net->proc_net, |
| 146 | &wireless_seq_fops)) | 146 | &wireless_seq_fops)) |
| 147 | return -ENOMEM; | 147 | return -ENOMEM; |
| 148 | 148 | ||
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index 0917f047f2cf..64b415e93f6a 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c | |||
| @@ -212,16 +212,16 @@ int __init x25_proc_init(void) | |||
| 212 | if (!proc_mkdir("x25", init_net.proc_net)) | 212 | if (!proc_mkdir("x25", init_net.proc_net)) |
| 213 | return -ENOMEM; | 213 | return -ENOMEM; |
| 214 | 214 | ||
| 215 | if (!proc_create("x25/route", S_IRUGO, init_net.proc_net, | 215 | if (!proc_create("x25/route", 0444, init_net.proc_net, |
| 216 | &x25_seq_route_fops)) | 216 | &x25_seq_route_fops)) |
| 217 | goto out; | 217 | goto out; |
| 218 | 218 | ||
| 219 | if (!proc_create("x25/socket", S_IRUGO, init_net.proc_net, | 219 | if (!proc_create("x25/socket", 0444, init_net.proc_net, |
| 220 | &x25_seq_socket_fops)) | 220 | &x25_seq_socket_fops)) |
| 221 | goto out; | 221 | goto out; |
| 222 | 222 | ||
| 223 | if (!proc_create("x25/forward", S_IRUGO, init_net.proc_net, | 223 | if (!proc_create("x25/forward", 0444, init_net.proc_net, |
| 224 | &x25_seq_forward_fops)) | 224 | &x25_seq_forward_fops)) |
| 225 | goto out; | 225 | goto out; |
| 226 | return 0; | 226 | return 0; |
| 227 | 227 | ||
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c index 6d5f85f4e672..ed06903cd84d 100644 --- a/net/xfrm/xfrm_proc.c +++ b/net/xfrm/xfrm_proc.c | |||
| @@ -79,7 +79,7 @@ static const struct file_operations xfrm_statistics_seq_fops = { | |||
| 79 | 79 | ||
| 80 | int __net_init xfrm_proc_init(struct net *net) | 80 | int __net_init xfrm_proc_init(struct net *net) |
| 81 | { | 81 | { |
| 82 | if (!proc_create("xfrm_stat", S_IRUGO, net->proc_net, | 82 | if (!proc_create("xfrm_stat", 0444, net->proc_net, |
| 83 | &xfrm_statistics_seq_fops)) | 83 | &xfrm_statistics_seq_fops)) |
| 84 | return -ENOMEM; | 84 | return -ENOMEM; |
| 85 | return 0; | 85 | return 0; |
