linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Forest Bond <forest@alittletooquiet.net>
To: Greg KH <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	"John W. Linville" <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Marcel Holtmann <marcel@holtmann.org>,
	linux-wireless@vger.kernel.org, Dan Williams <dcbw@redhat.com>
Subject: [PATCH 6/8] drivers/staging/vt6655/device_main.c: Drop obsolete fsuid/fsgid accesses.
Date: Sat, 25 Apr 2009 10:32:25 -0400	[thread overview]
Message-ID: <20090425143225.GF11201@storm.local.network> (raw)
In-Reply-To: <20090425001405.GB23173@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]

drivers/staging/vt6655/device_main.c: Drop obsolete fsuid/fsgid accesses.

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
---
 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 0d6aec9..126ecef 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)
     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;
 }
-- 
1.5.4.3


-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2009-04-25 14:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 10:52 [PATCH] Add vt6656 driver to drivers/staging Forest Bond
2009-04-14 11:07 ` Johannes Berg
2009-04-14 11:39   ` Forest Bond
2009-04-14 11:48     ` Johannes Berg
2009-04-14 12:28       ` Marcel Holtmann
2009-04-14 12:43         ` Johannes Berg
2009-04-14 13:02           ` John W. Linville
2009-04-14 14:19             ` Forest Bond
2009-04-15  1:10               ` Greg KH
2009-04-15  1:51                 ` Forest Bond
2009-04-19 17:09                   ` Forest Bond
2009-04-19 19:52                     ` Larry Finger
2009-04-19 20:01                       ` Forest Bond
2009-04-19 22:32                         ` Greg KH
2009-04-24 11:03                           ` Forest Bond
2009-04-24 14:44                             ` Larry Finger
2009-04-24 14:54                               ` Forest Bond
2009-04-24 22:58                             ` Greg KH
2009-04-25  0:08                               ` Forest Bond
2009-04-25  0:14                                 ` Greg KH
2009-04-25 14:31                                   ` [PATCH 2/8] Add includes to drivers/staging/vt6655 Forest Bond
2009-04-25 14:31                                   ` [PATCH 3/8] Integrate drivers/staging/vt6655 into build system Forest Bond
2009-04-25 14:32                                   ` [PATCH 4/8] Add necessary EXTRA_CFLAGS to drivers/staging/vt6655/Makefile Forest Bond
2009-04-25 14:32                                   ` [PATCH 5/8] Build vt6655.ko, not viawget.ko Forest Bond
2009-04-25 14:32                                   ` Forest Bond [this message]
2009-04-25 14:32                                   ` [PATCH 7/8] vt6655: Replace net_device->priv accesses with netdev_priv calls Forest Bond
2009-05-01  0:03                                     ` Forest Bond
2009-04-25 14:32                                   ` [PATCH 8/8] vt6655: Remove LINUX_VERSION_CODE preprocessor conditionals Forest Bond
2009-04-15 15:43                 ` [PATCH] Add vt6656 driver to drivers/staging Dan Williams
2009-04-16  2:51                   ` Greg KH
2009-04-15 13:19               ` John W. Linville
2009-04-14 14:52             ` Forest Bond
     [not found]             ` <18916.37868.64939.574249@gargle.gargle.HOWL>
2009-04-14 15:26               ` John W. Linville
2009-06-01 16:35 ` Gábor Stefanik
2009-06-01 16:52   ` Forest Bond
2009-06-08 17:08     ` Olivier Blin
2009-06-08 17:45       ` Forest Bond
2009-06-08 18:01         ` Olivier Blin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090425143225.GF11201@storm.local.network \
    --to=forest@alittletooquiet.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dcbw@redhat.com \
    --cc=greg@kroah.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).