aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index f9f15bb3f03a..c586f78c307f 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -232,8 +232,10 @@ static int adhoc;
232 232
233static int probe = 1; 233static int probe = 1;
234 234
235static kuid_t proc_kuid;
235static int proc_uid /* = 0 */; 236static int proc_uid /* = 0 */;
236 237
238static kgid_t proc_kgid;
237static int proc_gid /* = 0 */; 239static int proc_gid /* = 0 */;
238 240
239static int airo_perm = 0555; 241static int airo_perm = 0555;
@@ -4499,78 +4501,79 @@ struct proc_data {
4499static int setup_proc_entry( struct net_device *dev, 4501static int setup_proc_entry( struct net_device *dev,
4500 struct airo_info *apriv ) { 4502 struct airo_info *apriv ) {
4501 struct proc_dir_entry *entry; 4503 struct proc_dir_entry *entry;
4504
4502 /* First setup the device directory */ 4505 /* First setup the device directory */
4503 strcpy(apriv->proc_name,dev->name); 4506 strcpy(apriv->proc_name,dev->name);
4504 apriv->proc_entry = proc_mkdir_mode(apriv->proc_name, airo_perm, 4507 apriv->proc_entry = proc_mkdir_mode(apriv->proc_name, airo_perm,
4505 airo_entry); 4508 airo_entry);
4506 if (!apriv->proc_entry) 4509 if (!apriv->proc_entry)
4507 goto fail; 4510 goto fail;
4508 apriv->proc_entry->uid = proc_uid; 4511 apriv->proc_entry->uid = proc_kuid;
4509 apriv->proc_entry->gid = proc_gid; 4512 apriv->proc_entry->gid = proc_kgid;
4510 4513
4511 /* Setup the StatsDelta */ 4514 /* Setup the StatsDelta */
4512 entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm, 4515 entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm,
4513 apriv->proc_entry, &proc_statsdelta_ops, dev); 4516 apriv->proc_entry, &proc_statsdelta_ops, dev);
4514 if (!entry) 4517 if (!entry)
4515 goto fail_stats_delta; 4518 goto fail_stats_delta;
4516 entry->uid = proc_uid; 4519 entry->uid = proc_kuid;
4517 entry->gid = proc_gid; 4520 entry->gid = proc_kgid;
4518 4521
4519 /* Setup the Stats */ 4522 /* Setup the Stats */
4520 entry = proc_create_data("Stats", S_IRUGO & proc_perm, 4523 entry = proc_create_data("Stats", S_IRUGO & proc_perm,
4521 apriv->proc_entry, &proc_stats_ops, dev); 4524 apriv->proc_entry, &proc_stats_ops, dev);
4522 if (!entry) 4525 if (!entry)
4523 goto fail_stats; 4526 goto fail_stats;
4524 entry->uid = proc_uid; 4527 entry->uid = proc_kuid;
4525 entry->gid = proc_gid; 4528 entry->gid = proc_kgid;
4526 4529
4527 /* Setup the Status */ 4530 /* Setup the Status */
4528 entry = proc_create_data("Status", S_IRUGO & proc_perm, 4531 entry = proc_create_data("Status", S_IRUGO & proc_perm,
4529 apriv->proc_entry, &proc_status_ops, dev); 4532 apriv->proc_entry, &proc_status_ops, dev);
4530 if (!entry) 4533 if (!entry)
4531 goto fail_status; 4534 goto fail_status;
4532 entry->uid = proc_uid; 4535 entry->uid = proc_kuid;
4533 entry->gid = proc_gid; 4536 entry->gid = proc_kgid;
4534 4537
4535 /* Setup the Config */ 4538 /* Setup the Config */
4536 entry = proc_create_data("Config", proc_perm, 4539 entry = proc_create_data("Config", proc_perm,
4537 apriv->proc_entry, &proc_config_ops, dev); 4540 apriv->proc_entry, &proc_config_ops, dev);
4538 if (!entry) 4541 if (!entry)
4539 goto fail_config; 4542 goto fail_config;
4540 entry->uid = proc_uid; 4543 entry->uid = proc_kuid;
4541 entry->gid = proc_gid; 4544 entry->gid = proc_kgid;
4542 4545
4543 /* Setup the SSID */ 4546 /* Setup the SSID */
4544 entry = proc_create_data("SSID", proc_perm, 4547 entry = proc_create_data("SSID", proc_perm,
4545 apriv->proc_entry, &proc_SSID_ops, dev); 4548 apriv->proc_entry, &proc_SSID_ops, dev);
4546 if (!entry) 4549 if (!entry)
4547 goto fail_ssid; 4550 goto fail_ssid;
4548 entry->uid = proc_uid; 4551 entry->uid = proc_kuid;
4549 entry->gid = proc_gid; 4552 entry->gid = proc_kgid;
4550 4553
4551 /* Setup the APList */ 4554 /* Setup the APList */
4552 entry = proc_create_data("APList", proc_perm, 4555 entry = proc_create_data("APList", proc_perm,
4553 apriv->proc_entry, &proc_APList_ops, dev); 4556 apriv->proc_entry, &proc_APList_ops, dev);
4554 if (!entry) 4557 if (!entry)
4555 goto fail_aplist; 4558 goto fail_aplist;
4556 entry->uid = proc_uid; 4559 entry->uid = proc_kuid;
4557 entry->gid = proc_gid; 4560 entry->gid = proc_kgid;
4558 4561
4559 /* Setup the BSSList */ 4562 /* Setup the BSSList */
4560 entry = proc_create_data("BSSList", proc_perm, 4563 entry = proc_create_data("BSSList", proc_perm,
4561 apriv->proc_entry, &proc_BSSList_ops, dev); 4564 apriv->proc_entry, &proc_BSSList_ops, dev);
4562 if (!entry) 4565 if (!entry)
4563 goto fail_bsslist; 4566 goto fail_bsslist;
4564 entry->uid = proc_uid; 4567 entry->uid = proc_kuid;
4565 entry->gid = proc_gid; 4568 entry->gid = proc_kgid;
4566 4569
4567 /* Setup the WepKey */ 4570 /* Setup the WepKey */
4568 entry = proc_create_data("WepKey", proc_perm, 4571 entry = proc_create_data("WepKey", proc_perm,
4569 apriv->proc_entry, &proc_wepkey_ops, dev); 4572 apriv->proc_entry, &proc_wepkey_ops, dev);
4570 if (!entry) 4573 if (!entry)
4571 goto fail_wepkey; 4574 goto fail_wepkey;
4572 entry->uid = proc_uid; 4575 entry->uid = proc_kuid;
4573 entry->gid = proc_gid; 4576 entry->gid = proc_kgid;
4574 4577
4575 return 0; 4578 return 0;
4576 4579
@@ -5697,11 +5700,16 @@ static int __init airo_init_module( void )
5697{ 5700{
5698 int i; 5701 int i;
5699 5702
5703 proc_kuid = make_kuid(&init_user_ns, proc_uid);
5704 proc_kgid = make_kgid(&init_user_ns, proc_gid);
5705 if (!uid_valid(proc_kuid) || !gid_valid(proc_kgid))
5706 return -EINVAL;
5707
5700 airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL); 5708 airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL);
5701 5709
5702 if (airo_entry) { 5710 if (airo_entry) {
5703 airo_entry->uid = proc_uid; 5711 airo_entry->uid = proc_kuid;
5704 airo_entry->gid = proc_gid; 5712 airo_entry->gid = proc_kgid;
5705 } 5713 }
5706 5714
5707 for (i = 0; i < 4 && io[i] && irq[i]; i++) { 5715 for (i = 0; i < 4 && io[i] && irq[i]; i++) {