aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2860
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-05 17:18:40 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:11 -0500
commit18727963278a7199c75dba5ca3ad1e3455b1554a (patch)
treec9f9ae5e3977264306cd697a046742f5024b3de9 /drivers/staging/rt2860
parent91980990527258a075361490cecadbb7356fc0d2 (diff)
Staging: rt2860: 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>
Diffstat (limited to 'drivers/staging/rt2860')
-rw-r--r--drivers/staging/rt2860/rt_profile.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c
index a38e557a9ec..cd7ffc8a6e8 100644
--- a/drivers/staging/rt2860/rt_profile.c
+++ b/drivers/staging/rt2860/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
@@ -1551,8 +1553,11 @@ NDIS_STATUS RTMPReadParametersHook(
1551 } 1553 }
1552 1554
1553 set_fs(orgfs); 1555 set_fs(orgfs);
1554 current->fsuid = orgfsuid; 1556
1555 current->fsgid = orgfsgid; 1557#if 0
1558 current->cred->fsuid = orgfsuid;
1559 current->cred->fsgid = orgfsgid;
1560#endif
1556 1561
1557 kfree(buffer); 1562 kfree(buffer);
1558 kfree(tmpbuf); 1563 kfree(tmpbuf);