]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
staging: cpia: fix camera file owner in cpia_open()
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 10 Oct 2010 17:28:39 +0000 (21:28 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Nov 2010 21:24:12 +0000 (13:24 -0800)
Use effective UID instead of real UID for camera owner.
There is no need to check for pending signals just before successfull
return.  Exit in case of pending signal also leaved camera in open state.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/cpia/cpia.c

index 933ae4c8cb9a6467b63f2d576e2b008b86c95ae8..0e740b8dafc3781d8ac9afb55a6c8ffb0b596d40 100644 (file)
@@ -3184,13 +3184,9 @@ static int cpia_open(struct file *file)
                goto oops;
        }
 
-       err = -EINTR;
-       if(signal_pending(current))
-               goto oops;
-
        /* Set ownership of /proc/cpia/videoX to current user */
        if(cam->proc_entry)
-               cam->proc_entry->uid = current_uid();
+               cam->proc_entry->uid = current_euid();
 
        /* set mark for loading first frame uncompressed */
        cam->first_frame = 1;