Skip to content

Commit

Permalink
staging: cpia: fix camera file owner in cpia_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Nov 9, 2010
1 parent 97b5519 commit c888d4e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/staging/cpia/cpia.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c888d4e

Please sign in to comment.