summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-02 20:44:05 +0200
committerKay Sievers <kay@vrfy.org>2012-07-02 20:45:59 +0200
commitef8a2bf6484bb0f82248ceb10a55509a93d82c6b (patch)
treecba9f5083bc75375a1cb1b2eebb0b1871837c5fc /src/udev
parent91ac74250149a29122b2291c5393dec4592430d4 (diff)
udev: static nodes - fix default permissions if no rules is given
<falconindy> kay: just curious -- it looks like nodes created by udev from modules.devname all have 000 perms, and there's nothing in udev that attempts to change this. is it intended? <falconindy> c--------- 1 root root 10, 223 Jul 1 23:10 uinput <kay> falconindy: we might miss the default of 0600 <falconindy> seems like it <kay> falconindy: stuff that has a rule works i guess <kay> falconindy: i'll add the 0600 now
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index a5478a754e..393e2a920c 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -845,10 +845,11 @@ static void static_dev_create_from_modules(struct udev *udev)
if (sscanf(devno, "%c%u:%u", &type, &maj, &min) != 3)
continue;
+ mode = 0600;
if (type == 'c')
- mode = S_IFCHR;
+ mode |= S_IFCHR;
else if (type == 'b')
- mode = S_IFBLK;
+ mode |= S_IFBLK;
else
continue;