Closed valpackett closed 3 years ago
The change triggers panic if created symlink already exists as uhid(4) character device or vice versa. To fix it both unit numbers should be allocated from the same pool. Currently uhid's pool is private and cannot not be directly accessed from outside of uhid.c. There are 2 ways to export it.
static devclass_t uhid_devclass;
variable public. It requires changing of OS sources so can not be easily done before iichid/hidraw import in to the base system has happened.driver_module_handler()
, which will attach hidraw driver to uhid devclass with using of devclass_find()
and devclass_add_driver()
.IMO 2-nd option is overkill, so I place the patch on hold untill hidraw hit the sources.
The change has been committed to 13-CURRENT. It is enabled with specifying of HIDRAW_MAKE_UHID_ALIAS kernel option. It can not be accepted by https://github.com/wulf7/iichid for the reason mentioned above. So close the pull request.
Because e.g. Firefox would not look for hidraw devices on FreeBSD right now.
ref: https://github.com/mozilla/authenticator-rs/pull/62
Tested with a Yubikey and Firefox. devd with u2f rules sets u2f group (and group write permission) on the hidraw devices, uhid aliases are symlinks without the group write permission but that seems fine — works in Firefox.