patch to make mdev take notice of file perms in mdev.conf

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Sep 25 17:27:28 UTC 2008


On Thu, Sep 25, 2008 at 04:56:15PM +0100, Stuart Hughes wrote:
>Here's a patch against 1.11.2 that changes mdev so that it will set the
>file permissions on a device node that are given in mdev.conf.
>
>Regards, Stuart

>20080925 Stuart Hughes <stuarth at freescale dot com>
>
>Make mdev take notice of file mode in mdev.conf
>
>diff --exclude CVS -uNr busybox-1.11.2/util-linux/mdev.c busybox-1.11.2.modified/util-linux/mdev.c
>--- busybox-1.11.2/util-linux/mdev.c	2008-06-25 13:51:32.000000000 +0100
>+++ busybox-1.11.2.modified/util-linux/mdev.c	2008-09-25 15:36:33.000000000 +0100
>@@ -254,6 +254,7 @@
> 
> 		if (ENABLE_FEATURE_MDEV_CONF) {
> 			chown(device_name, uid, gid);
>+			chmod(device_name, mode);

are you sure?
A few lines above, mknod is called with the proper mode already?



More information about the busybox mailing list