diff options
author | Forest Bond <forest@alittletooquiet.net> | 2009-04-25 10:32:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:51 -0400 |
commit | 756f94e6386519696455a3b1a15f3d451bcf73c7 (patch) | |
tree | 930cf4c353c75453bc06446b69184afc76615385 | |
parent | 1cb648b34879b79975f68728be70bae05979ae13 (diff) |
Staging: vt6655: Drop obsolete fsuid/fsgid accesses.
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>
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index bade552ba737..d8f7f4f7bac4 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c | |||
@@ -3278,15 +3278,18 @@ int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter) | |||
3278 | UCHAR tmpbuffer[20]; | 3278 | UCHAR tmpbuffer[20]; |
3279 | struct file *filp=NULL; | 3279 | struct file *filp=NULL; |
3280 | mm_segment_t old_fs = get_fs(); | 3280 | mm_segment_t old_fs = get_fs(); |
3281 | int oldfsuid=0,oldfsgid=0; | 3281 | //int oldfsuid=0,oldfsgid=0; |
3282 | int result=0; | 3282 | int result=0; |
3283 | 3283 | ||
3284 | set_fs (KERNEL_DS); | 3284 | set_fs (KERNEL_DS); |
3285 | //Make sure a caller can read or write power as root | 3285 | |
3286 | oldfsuid=current->fsuid; | 3286 | /* Can't do this anymore, so we rely on correct filesystem permissions: |
3287 | oldfsgid=current->fsgid; | 3287 | //Make sure a caller can read or write power as root |
3288 | current->fsuid = 0; | 3288 | oldfsuid=current->cred->fsuid; |
3289 | current->fsgid = 0; | 3289 | oldfsgid=current->cred->fsgid; |
3290 | current->cred->fsuid = 0; | ||
3291 | current->cred->fsgid = 0; | ||
3292 | */ | ||
3290 | 3293 | ||
3291 | //open file | 3294 | //open file |
3292 | filp = filp_open(config_path, O_RDWR, 0); | 3295 | filp = filp_open(config_path, O_RDWR, 0); |
@@ -3344,8 +3347,11 @@ error1: | |||
3344 | 3347 | ||
3345 | error2: | 3348 | error2: |
3346 | set_fs (old_fs); | 3349 | set_fs (old_fs); |
3347 | current->fsuid=oldfsuid; | 3350 | |
3348 | current->fsgid=oldfsgid; | 3351 | /* |
3352 | current->cred->fsuid=oldfsuid; | ||
3353 | current->cred->fsgid=oldfsgid; | ||
3354 | */ | ||
3349 | 3355 | ||
3350 | return result; | 3356 | return result; |
3351 | } | 3357 | } |