VLC network capture permission

This forum is about all development around libVLC.
Mat
New Cone
New Cone
Posts: 2
Joined: 22 Dec 2016 11:49

VLC network capture permission

Postby Mat » 22 Dec 2016 12:02

Hey,

I'm currently working on a research project about wireless streaming. I need to capture the network traffic during a stream. I wrote a small library thats able to capture the network data I need. If I build a small demo with my library, it works perfectly. Even a normal user (I'm using a current fedora release) is allowed to capture on the network interface without root privileges. This is possible by applying setcap (e.g. "setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip cap_net_bind_service=+ep' ./demo") on the executable.

Now I wrote a sample VLC-Demux Plugin, which includes my library. VLC is not able to open the network interface. It fails with (like) "Operation not permitted. You are not allowed to capture on this interface".
- Setcap on the VLC executables does not change anything ( I also tried it on the generated .so files).
- I tried to run VLC as root (built with "--enable-run-as-root"), same problem. Operation not permitted.

So finally it seems like the privileges are set back somehow by VLC. I was not able to find any code section where this happens. Has anybody an idea what could be the problem? Or where to find the part of the VLC code, where this kind of "reset" happens?

Thanks for your help,
and a merry christmas to all!
Best,
Matthias

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC network capture permission

Postby Rémi Denis-Courmont » 22 Dec 2016 17:58

I'm pretty sure that VLC is not changing capabilities. It does not even know what libcap is.

If you're sure this is caused within the VLC process, run it in a debugger and see where the call comes from.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Mat
New Cone
New Cone
Posts: 2
Joined: 22 Dec 2016 11:49

Re: VLC network capture permission

Postby Mat » 23 Dec 2016 08:59

Hm, we have tried initializing our library directly at the beginning of the VLC main function now. Same problem. If we try to read the caps, they are already "empty" at this point... What happens with the capabilities...? Strange behavior...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests