summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorVasiliy Kulikov <segooon@gmail.com>2010-10-10 21:28:39 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-09 13:24:12 -0800
commitc888d4e7b2644c7ff17098b0b521c29b98e0abd0 (patch)
treeda5d895b70ab332276d722b376c9c3d3745ac5db /drivers/staging
parent97b5519b08086eec02f2241b6764d73f997014c9 (diff)
staging: cpia: fix camera file owner in cpia_open()
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/cpia/cpia.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/cpia/cpia.c b/drivers/staging/cpia/cpia.c
index 933ae4c8cb9a..0e740b8dafc3 100644
--- a/drivers/staging/cpia/cpia.c
+++ b/drivers/staging/cpia/cpia.c
@@ -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;