]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
Cleanup pppoe-discovery fatal functions
[ppp.git] / pppd / main.c
index 099c0505a4217ff942e75ffe3fb419996a0e7b57..87a5d29217bb48103440c3af6e467f75854e49dd 100644 (file)
@@ -293,6 +293,9 @@ main(int argc, char *argv[])
     struct protent *protp;
     char numbuf[16];
 
+    strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
+    strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
+
     link_stats_valid = 0;
     new_phase(PHASE_INITIALIZE);
 
@@ -763,8 +766,7 @@ detach(void)
        /* update pid files if they have been written already */
        if (pidfilename[0])
            create_pidfile(pid);
-       if (linkpidfile[0])
-           create_linkpidfile(pid);
+       create_linkpidfile(pid);
        exit(0);                /* parent dies */
     }
     setsid();
@@ -1640,7 +1642,7 @@ device_script(char *program, int in, int out, int dont_wait)
     if (log_to_fd >= 0)
        errfd = log_to_fd;
     else
-       errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);
+       errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0644);
 
     ++conn_running;
     pid = safe_fork(in, out, errfd);