After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 566121 - [dv1394src] Wrong error message when the user has no permissions on the firewire devices
[dv1394src] Wrong error message when the user has no permissions on the firew...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-31 12:10 UTC by Xavier Queralt
Modified: 2010-09-26 21:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Xavier Queralt 2008-12-31 12:10:48 UTC
Please describe the problem:
When the user running gstreamer has not read/write permissions on the raw1394 or fwX devices the error message shown is "Resource not found." instead of " Could not open resource for reading."

Using the latest gstreamer (from CVS) and the latest libraw1394 (from the git repository it also happens with the 2.0 version)

Steps to reproduce:
1. Log-in with an unprivileged user without read & write permissions on /dev/raw1394 ir /dev/fwX
2. Run gst-launch dv1394src ! fakesink


Actual results:
xavier@xqueralt:cvs > gst-launch dv1394src ! fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstDV1394Src:dv1394src0: Resource not found.
Additional debug info:
gstdv1394src.c(891): gst_dv1394src_start (): /GstPipeline:pipeline0/GstDV1394Src:dv1394src0:
no ports available for raw1394
Setting pipeline to NULL ...
FREEING pipeline ...

Expected results:
xavier@xqueralt:cvs > gst-launch dv1394src ! fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstDV1394Src:dv1394src0: Could not open resource for reading.
Additional debug info:
gstdv1394src.c(872): gst_dv1394src_start (): /GstPipeline:pipeline0/GstDV1394Src:dv1394src0:
system error: Permission denied
Setting pipeline to NULL ...
FREEING pipeline ...

Does this happen every time?


Other information:
Maybe this is a bug of libraw1394 instead of gst as the raw1394_new_handle method is always returning a handle even when the devices couldn't been opened. This is because if no raw1394 device is found or there is a problem while opening it the fw_new_handle is called to look for the fwX devices, this last method doesn't check whether the devices could be opened and always returns the handle structure.
Comment 1 Tim-Philipp Müller 2010-09-26 21:20:34 UTC
This does indeed look like a bug in libraw1394 to me. According to the documentation, _new_handle() should fail in case of permissions problems, with errno set accordingly, but that doesn't seem to happen here. And I don't really see how/where else one would check for an error.

You could check out with strace gst-launch-0.10 ... what's happening under the hood, maybe that shows something interesting.