kernel: lantiq: ltq-vmmc: introduce user group for vmmc
authorDaniel Golle <daniel@makrotopia.org>
Sun, 3 Mar 2024 15:22:54 +0000 (15:22 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 3 Mar 2024 15:44:52 +0000 (15:44 +0000)
asterisk-chan-lantiq is by now the only user of the VMMC interface.
And asterisk runs as user 'asterisk' which doesn't give it permission
to open the /dev/vmmc* devices.
Introduce a new user group 'vmmc' and give permission to access the
/dev/vmmc* devices to that group.
Another commit for asterisk-chan-lantiq will add the 'asterisk' user
to that group.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/kernel/lantiq/ltq-vmmc/Makefile
package/kernel/lantiq/ltq-vmmc/files/vmmc.init

index c96cee819b60309ebd3ff07cd1f363a2bc33c300..4972f1c374a98f62675eb88d736b6b47c5c1c4c6 100644 (file)
@@ -29,6 +29,7 @@ define KernelPackage/ltq-vmmc
   DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xrx200) +kmod-ltq-tapi
   FILES:=$(PKG_BUILD_DIR)/src/drv_vmmc.ko
   AUTOLOAD:=$(call AutoProbe,drv_vmmc)
+  USERID:=:vmmc=386
 endef
 
 define KernelPackage/ltq-vmmc/description
index 402376e294269016a2c8ec1f9f5c72f80b828e47..78efe80b9808389ac73a6029597f76dad2293446 100644 (file)
@@ -8,6 +8,7 @@ start() {
        for i in 10 11 12 13 14 15 16 17 18; do
                if ! [ -e /dev/vmmc$i ]; then
                        mknod -m 664 /dev/vmmc$i c 122 $i
+                       chown root:vmmc /dev/vmmc$i
                fi
        done
 }