Fix invalid use of open()
[project/odhcp6c.git] / 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());