aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-05 18:23:19 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:35 -0500
commit5a501b3011095c9afb396cdade5be8db359df977 (patch)
tree90b978c7c63c424c02157ae44b8b084a631e4437
parentc55519ff75224222f4668c92ae3733059269f575 (diff)
Staging: rt2870: disable root hack for reading files
We are now using credentials, so just blindly setting the fsuid and fsguid isn't acceptable. All this means is that the config file needs to be readable by the driver thread, not a big deal. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/rt2870/rt_profile.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/rt2870/rt_profile.c b/drivers/staging/rt2870/rt_profile.c
index 3e360c661589..c4474a6428ac 100644
--- a/drivers/staging/rt2870/rt_profile.c
+++ b/drivers/staging/rt2870/rt_profile.c
@@ -925,9 +925,11 @@ NDIS_STATUS RTMPReadParametersHook(
925 925
926 // Save uid and gid used for filesystem access. 926 // Save uid and gid used for filesystem access.
927 // Set user and group to 0 (root) 927 // Set user and group to 0 (root)
928 orgfsuid = current->fsuid; 928 orgfsuid = current_fsuid();
929 orgfsgid = current->fsgid; 929 orgfsgid = current_fsgid();
930 current->fsuid=current->fsgid = 0; 930 /* Hm, can't really do this nicely anymore, so rely on these files
931 * being set to the proper permission to read them... */
932 /* current->cred->fsuid = current->cred->fsgid = 0; */
931 orgfs = get_fs(); 933 orgfs = get_fs();
932 set_fs(KERNEL_DS); 934 set_fs(KERNEL_DS);
933 935
@@ -1590,8 +1592,10 @@ NDIS_STATUS RTMPReadParametersHook(
1590 } 1592 }
1591 1593
1592 set_fs(orgfs); 1594 set_fs(orgfs);
1595#if 0
1593 current->fsuid = orgfsuid; 1596 current->fsuid = orgfsuid;
1594 current->fsgid = orgfsgid; 1597 current->fsgid = orgfsgid;
1598#endif
1595 1599
1596 kfree(buffer); 1600 kfree(buffer);
1597 kfree(tmpbuf); 1601 kfree(tmpbuf);