summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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(
// Save uid and gid used for filesystem access.
// Set user and group to 0 (root)
- orgfsuid = current->fsuid;
- orgfsgid = current->fsgid;
- current->fsuid=current->fsgid = 0;
+ orgfsuid = current_fsuid();
+ orgfsgid = current_fsgid();
+ /* Hm, can't really do this nicely anymore, so rely on these files
+ * being set to the proper permission to read them... */
+ /* current->cred->fsuid = current->cred->fsgid = 0; */
orgfs = get_fs();
set_fs(KERNEL_DS);
@@ -1590,8 +1592,10 @@ NDIS_STATUS RTMPReadParametersHook(
}
set_fs(orgfs);
+#if 0
current->fsuid = orgfsuid;
current->fsgid = orgfsgid;
+#endif
kfree(buffer);
kfree(tmpbuf);