# Webcamd in a jail



## trumee (May 22, 2017)

I would like to use the Hauppauge HD-PVR tv tuner with mythtv running in a jail. It is supported by the 'hdpvr' driver which is part of webcamd. Unfortunately, webcamd comes with quite a few dependencies (listed below), therefore i would rather install it in a jail and not on the host.

The manpage of webcamd suggest that cuse kernel module is loaded on the host, which i have done. Is it possible to use webcamd hdpvr driver in a jail without installing it on the host?


```
# pkg install webcamd
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
The following 25 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        webcamd: 4.8.0.4
        hal: 0.5.14_31
        policykit: 0.9_10
        libxml2: 2.9.4
        glib: 2.50.2_2,1
        libiconv: 1.14_10
        dbus-glib: 0.108
        dbus: 1.10.16_1
        libX11: 1.6.5,1
        xproto: 7.0.31
        libxcb: 1.12_2
        libXdmcp: 1.1.2
        libXau: 1.0.8_3
        libpthread-stubs: 0.4
        kbproto: 1.0.7
        libSM: 1.2.2_3,1
        libICE: 1.0.9_1,1
        gnome_subr: 1.0
        consolekit: 0.4.5_4
        polkit: 0.113_5
        spidermonkey170: 17.0.0_6
        nspr: 4.14_1
        libvolume_id: 0.81.1
        libv4l: 1.6.3_2
        jpeg-turbo: 1.5.1

Number of packages to be installed: 25

The process will require 61 MiB more space.
12 MiB to be downloaded.
```


----------



## junkyalleycat (Dec 17, 2018)

I was just puzzling over the same issue and dug into it a bit.

Webcamd ignores possible error conditions when calling the cuse library to create device nodes.

Creating device nodes requires PRIV_DRIVER privileges, which jail processes do not possess (nor can they if I understand prison_priv_check in the kernel correctly).

Because webcamd ignores the return code, it gives the appearance of success (Creating /dev/…).

I moved my webcamd to the jail's host instead, but opted to compile it from ports and omit the HAL dependency, greatly reducing the overall dependency graph.


----------

