提交 c888d4e7 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

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: NVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 97b5519b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册