diff options
-rwxr-xr-x | testsuite/mdev.tests | 12 | ||||
-rw-r--r-- | util-linux/mdev.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests index 90379e668..388c41d52 100755 --- a/testsuite/mdev.tests +++ b/testsuite/mdev.tests | |||
@@ -49,6 +49,18 @@ brw-rw-rw- 1 1 1 8,0 sda | |||
49 | 49 | ||
50 | # continuing to use directory structure from prev test | 50 | # continuing to use directory structure from prev test |
51 | rm -rf mdev.testdir/dev/* | 51 | rm -rf mdev.testdir/dev/* |
52 | echo "-.* 1:1 666" >mdev.testdir/etc/mdev.conf | ||
53 | echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf | ||
54 | testing "mdev does not stop on dash-rule" \ | ||
55 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; | ||
56 | ls -ln mdev.testdir/dev | $FILTER_LS" \ | ||
57 | "\ | ||
58 | br--r--r-- 1 2 2 8,0 sda | ||
59 | " \ | ||
60 | "" "" | ||
61 | |||
62 | # continuing to use directory structure from prev test | ||
63 | rm -rf mdev.testdir/dev/* | ||
52 | echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf | 64 | echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf |
53 | testing "mdev move/symlink rule '>bar/baz'" \ | 65 | testing "mdev move/symlink rule '>bar/baz'" \ |
54 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; | 66 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; |
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index f965b6069..43527f645 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -274,6 +274,7 @@ static void make_device(char *path, int delete) | |||
274 | if (major == root_major && minor == root_minor) | 274 | if (major == root_major && minor == root_minor) |
275 | symlink(device_name, "root"); | 275 | symlink(device_name, "root"); |
276 | #if ENABLE_FEATURE_MDEV_CONF | 276 | #if ENABLE_FEATURE_MDEV_CONF |
277 | chmod(device_name, mode); | ||
277 | chown(device_name, ugid.uid, ugid.gid); | 278 | chown(device_name, ugid.uid, ugid.gid); |
278 | # if ENABLE_FEATURE_MDEV_RENAME | 279 | # if ENABLE_FEATURE_MDEV_RENAME |
279 | if (alias) { | 280 | if (alias) { |