chiark / gitweb /
[PATCH] apply default permissions only for devices that will need it
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sun, 10 Apr 2005 19:15:12 +0000 (21:15 +0200)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:55:01 +0000 (23:55 -0700)
udev_utils.c

index 5cdfb14..74b55ed 100644 (file)
@@ -89,9 +89,11 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs
                }
        }
 
-       udev->mode = 0660;
-       strcpy(udev->owner, "root");
-       strcpy(udev->group, "root");
+       if (udev->type == DEV_BLOCK || udev->type == DEV_CLASS) {
+               udev->mode = 0660;
+               strcpy(udev->owner, "root");
+               strcpy(udev->group, "root");
+       }
 
        return 0;
 }