mdev: device node changes parent dir permissions to 777.

Piotr Karbowski piotr.karbowski at gmail.com
Tue Dec 18 09:11:26 UTC 2012


Hi,

For some reason when i do move /dev/msr[0-9]+ nodes to /dev/cpu the 
/dev/cpu is getting 777 permissions. The very rule that affect it:

msr([0-9]+)        root:root 600 =cpu/%1/msr

Testcase:

### mdev.conf without msr:
microcode       root:root 600 =cpu/
cpu([0-9]+)     root:root 600 =cpu/%1/cpuid

# rm /dev/cpu -rf; mdev -s; ls -ld /dev/cpu
drwxr-xr-x 6 root root 140 Dec 18 10:07 /dev/cpu/

Good so far.

### mdev.conf with msr:
microcode       root:root 600 =cpu/
cpu([0-9]+)     root:root 600 =cpu/%1/cpuid
msr([0-9]+)     root:root 600 =cpu/%1/msr

# rm /dev/cpu -rf; mdev -s; ls -ld /dev/cpu
drwxrwxrwx 6 root root 140 Dec 18 10:08 /dev/cpu/

And the /dev/cpu is 777, whatever is the order of msr, or even with 
there is only rule for msr, the /dev/cpu become 777, the /dev/cpu/0/ is 
755 as it should be.

Busybox mdev 1.20.2

-- Piotr.


More information about the busybox mailing list