]> git.decadent.org.uk Git - odhcp6c.git/commitdiff
Fix invalid use of open()
authorSteven Barth <steven@midlink.org>
Sat, 1 Mar 2014 12:31:33 +0000 (13:31 +0100)
committerSteven Barth <steven@midlink.org>
Sat, 1 Mar 2014 12:31:33 +0000 (13:31 +0100)
src/odhcp6c.c

index e52e4e0dcd186e53f740afdffb00638384c177aa..dfd99254ca7ff7bb015e000f0fd4730460775499 100644 (file)
@@ -259,7 +259,7 @@ int main(_unused int argc, char* const argv[])
                        pidfile = pidbuf;
                }
 
-               int fd = open(pidfile, O_WRONLY | O_CREAT);
+               int fd = open(pidfile, O_WRONLY | O_CREAT, 0644);
                if (fd >= 0) {
                        char buf[8];
                        int len = snprintf(buf, sizeof(buf), "%i\n", getpid());