Call mkpath() with a 022 umask, then restore it to 0 - smdev - suckless mdev
 (HTM) git clone git://git.suckless.org/smdev
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 265d727f2d1caa61e8336b3a36f9e176aa57f5d6
 (DIR) parent 5ce5c84744b108344c59ac30c77ef6a0d2dcde76
 (HTM) Author: sin <sin@2f30.org>
       Date:   Wed, 21 Aug 2013 11:20:20 +0100
       
       Call mkpath() with a 022 umask, then restore it to 0
       
       Diffstat:
         M smdev.c                             |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/smdev.c b/smdev.c
       @@ -113,8 +113,10 @@ create_dev(const char *path)
                                case '=':
                                        if (Rule->path[strlen(Rule->path) - 1] == '/') {
                                                snprintf(devpath, sizeof(devpath), "/dev/%s", &Rule->path[1]);
       +                                        umask(022);
                                                if (mkpath(devpath, 0755) < 0)
                                                        eprintf("mkdir %s:", devpath);
       +                                        umask(0);
                                                strcat(devpath, devname);
                                        } else {
                                                snprintf(devpath, sizeof(devpath),