aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2025-11-06 16:18:19 +0100
committerLaurent Bercot <ska-skaware@skarnet.org>2025-11-06 16:23:24 +0000
commit252f241e425bf09ddfb4a824e40403f40da0da1e (patch)
tree50171ccbcba4573946bff597516b8bd132bb29c6 /src
parenta6cbdcb903ad29a95cfa80c29a64d33186741e74 (diff)
downloadmdevd-252f241e425bf09ddfb4a824e40403f40da0da1e.tar.gz
Don't chmod device nodes for ! lines
Busybox mdev will not chmod the device node when the matched rule contains a '!'. Matching this behaviour makes it possible for a rule to preserve the mode set by the kernel for devices that are created automatically by devtmpfs. Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'src')
-rw-r--r--src/mdevd/mdevd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c
index 3040ba6..aecd5a7 100644
--- a/src/mdevd/mdevd.c
+++ b/src/mdevd/mdevd.c
@@ -640,7 +640,7 @@ static inline int run_scriptelem (struct uevent_s const *event, scriptelem const
break ;
}
}
- if (nodelen && ud->action == ACTION_ADD && ud->mmaj >= 0)
+ if (elem->movetype != MOVEINFO_NOCREATE && nodelen && ud->action == ACTION_ADD && ud->mmaj >= 0)
{
if (!makesubdirs(node)) return -1 ;
if (dryrun)