Staging: vt6655: Drop obsolete fsuid/fsgid accesses.
authorForest Bond <forest@alittletooquiet.net>
Sat, 25 Apr 2009 14:32:25 +0000 (10:32 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:51 +0000 (11:00 -0700)
drivers/staging/vt6655/device_main.c: Drop obsolete fsuid/fsgid accesses.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6655/device_main.c

index bade552ba737f94630e520f35bd10923abe021ca..d8f7f4f7bac417bc7a0918961e0f06eea31e8a0e 100644 (file)
@@ -3278,15 +3278,18 @@ int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter)
     UCHAR      tmpbuffer[20];
     struct file   *filp=NULL;
     mm_segment_t old_fs = get_fs();
-    int oldfsuid=0,oldfsgid=0;
+    //int oldfsuid=0,oldfsgid=0;
     int result=0;
 
     set_fs (KERNEL_DS);
-//Make sure a caller can read or write power as root
-   oldfsuid=current->fsuid;
-   oldfsgid=current->fsgid;
-    current->fsuid = 0;
-    current->fsgid = 0;
+
+    /* Can't do this anymore, so we rely on correct filesystem permissions:
+    //Make sure a caller can read or write power as root
+    oldfsuid=current->cred->fsuid;
+    oldfsgid=current->cred->fsgid;
+    current->cred->fsuid = 0;
+    current->cred->fsgid = 0;
+    */
 
     //open file
       filp = filp_open(config_path, O_RDWR, 0);
@@ -3344,8 +3347,11 @@ error1:
 
 error2:
   set_fs (old_fs);
-  current->fsuid=oldfsuid;
-  current->fsgid=oldfsgid;
+
+  /*
+  current->cred->fsuid=oldfsuid;
+  current->cred->fsgid=oldfsgid;
+  */
 
   return result;
 }