chmod existing nodes - smdev - suckless mdev | |
git clone git://git.suckless.org/smdev | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6bc6f96acdf7319ff6a71007d025762a42700a34 | |
parent 8296616c9491377f54b82f3fb4ddf4b34b387c4e | |
Author: fbt <[email protected]> | |
Date: Fri, 1 Aug 2014 08:28:12 +0400 | |
chmod existing nodes | |
Diffstat: | |
M smdev.c | 3 +++ | |
1 file changed, 3 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/smdev.c b/smdev.c | |
@@ -309,6 +309,9 @@ createdev(struct event *ev) | |
if (chown(rpath.path, pw->pw_uid, gr->gr_gid) < 0) | |
eprintf("chown %s:", rpath.path); | |
+ if (chmod(rpath.path, rule->mode) < 0) | |
+ eprintf("chmod %s:", rpath.path); | |
+ | |
if (rule->path && rule->path[0] == '>') { | |
/* ev->devname is the original device name */ | |
snprintf(buf, sizeof(buf), "/dev/%s", ev->devname); |