VLC network capture permission
Posted: 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
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