]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
pppd: add experimental support for PEAP protocol, an extension of EAP
[ppp.git] / pppd / main.c
index 2b5393624f7800e55d50beed334a85453422e312..203202fe6ed6ffcbc21cbcf7cd102c58e5b3a9a9 100644 (file)
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <ctype.h>
 #include <stdlib.h>
 
 
 /* interface vars */
-char ifname[MAXIFNAMELEN];     /* Interface name */
+char ifname[IFNAMSIZ];         /* Interface name */
 int ifunit;                    /* Interface unit number */
 
 struct channel *the_channel;
@@ -766,8 +770,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();
@@ -1643,7 +1646,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);