chiark / gitweb /
[PATCH] fix permissions to work properly now.
authorgreg@kroah.com <greg@kroah.com>
Wed, 19 Nov 2003 17:23:24 +0000 (09:23 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:25 +0000 (21:06 -0700)
Forgot about umask in mknod...

udev-add.c

index 6f0e3bf..7ba873a 100644 (file)
@@ -135,6 +135,12 @@ static int create_node(struct udevice *dev)
                dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
                    filename, dev->mode, dev->major, dev->minor, strerror(errno));
 
+       dbg("chmod(%s, %#o)", filename, dev->mode);
+       retval = chmod(filename, dev->mode);
+       if (retval)
+               dbg("chmod(%s, %#o) failed with error '%s'",
+                   filename, dev->mode, strerror(errno));
+
        if (*dev->owner) {
                char *endptr;
                unsigned long id = strtoul(dev->owner, &endptr, 10);