smdev

suckless mdev
git clone git://git.2f30.org/smdev
Log | Files | Refs | README | LICENSE

commit a7b24e8391c23cdaf3ab7e73d48b8410f6fe536f
parent 4e4ade53058e03ca944b5cafbbbe7384eecfea02
Author: sin <sin@2f30.org>
Date:   Thu, 29 Aug 2013 20:08:40 +0100

Prevent creation of device nodes with !

Diffstat:
Msmdev.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/smdev.c b/smdev.c @@ -238,6 +238,9 @@ createdev(struct event *ev) rule = ev->rule; + if (rule->path && rule->path[0] == '!') + return 0; + snprintf(buf, sizeof(buf), "%d:%d", ev->major, ev->minor); if ((type = devtype(buf)) < 0) return -1;