Staging: vt6656: main_usb.c: Drop obsolete fsuid/fsgid accesses.
drivers/staging/vt6656/main_usb.c: Drop obsolete fsuid/fsgid accesses. Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f02a8cbc50
commit
8f9c466f29
@@ -1655,15 +1655,17 @@ static UCHAR *Config_FileOperation(PSDevice pDevice) {
|
|||||||
UCHAR *buffer=NULL;
|
UCHAR *buffer=NULL;
|
||||||
struct file *filp=NULL;
|
struct file *filp=NULL;
|
||||||
mm_segment_t old_fs = get_fs();
|
mm_segment_t old_fs = get_fs();
|
||||||
int oldfsuid=0,oldfsgid=0;
|
//int oldfsuid=0,oldfsgid=0;
|
||||||
int result=0;
|
int result=0;
|
||||||
|
|
||||||
set_fs (KERNEL_DS);
|
set_fs (KERNEL_DS);
|
||||||
//Make sure a caller can read or write power as root
|
/* Can't do this anymore, so we rely on correct filesystem permissions:
|
||||||
oldfsuid=current->fsuid;
|
//Make sure a caller can read or write power as root
|
||||||
oldfsgid=current->fsgid;
|
oldfsuid=current->fsuid;
|
||||||
|
oldfsgid=current->fsgid;
|
||||||
current->fsuid = 0;
|
current->fsuid = 0;
|
||||||
current->fsgid = 0;
|
current->fsgid = 0;
|
||||||
|
*/
|
||||||
|
|
||||||
//open file
|
//open file
|
||||||
filp = filp_open(config_path, O_RDWR, 0);
|
filp = filp_open(config_path, O_RDWR, 0);
|
||||||
@@ -1697,8 +1699,11 @@ error1:
|
|||||||
|
|
||||||
error2:
|
error2:
|
||||||
set_fs (old_fs);
|
set_fs (old_fs);
|
||||||
|
|
||||||
|
/*
|
||||||
current->fsuid=oldfsuid;
|
current->fsuid=oldfsuid;
|
||||||
current->fsgid=oldfsgid;
|
current->fsgid=oldfsgid;
|
||||||
|
*/
|
||||||
|
|
||||||
if(result!=0) {
|
if(result!=0) {
|
||||||
if(buffer)
|
if(buffer)
|
||||||
|
Reference in New Issue
Block a user