X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fpatches%2Fppp%2F0013-everywhere-O_CLOEXEC-harder.patch;h=2513021b226a9f28b65b0d9b73cb86d19b4bda5f;hb=2d6e633d7f20bd94cbc36880049d2599e93bdaf3;hp=0fb0287790cfd391dc5338e7be417afb09d751fe;hpb=33cfcae627a50d24683e3b365d4d65f54184d030;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/src/patches/ppp/0013-everywhere-O_CLOEXEC-harder.patch b/src/patches/ppp/0013-everywhere-O_CLOEXEC-harder.patch index 0fb0287790..2513021b22 100644 --- a/src/patches/ppp/0013-everywhere-O_CLOEXEC-harder.patch +++ b/src/patches/ppp/0013-everywhere-O_CLOEXEC-harder.patch @@ -27,10 +27,10 @@ index 6ea6c1f..faced53 100644 free(path); errno = err; diff --git a/pppd/main.c b/pppd/main.c -index 87a5d29..152e4a2 100644 +index 6d50d1b..4880377 100644 --- a/pppd/main.c +++ b/pppd/main.c -@@ -400,7 +400,7 @@ main(int argc, char *argv[]) +@@ -420,7 +420,7 @@ main(argc, argv) die(0); /* Make sure fds 0, 1, 2 are open to somewhere. */ @@ -39,12 +39,12 @@ index 87a5d29..152e4a2 100644 if (fd_devnull < 0) fatal("Couldn't open %s: %m", _PATH_DEVNULL); while (fd_devnull <= 2) { -@@ -1642,7 +1642,7 @@ device_script(char *program, int in, int out, int dont_wait) +@@ -1679,7 +1679,7 @@ device_script(program, in, out, dont_wait) if (log_to_fd >= 0) errfd = log_to_fd; else -- errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0644); -+ errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0644); +- errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600); ++ errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0600); ++conn_running; pid = safe_fork(in, out, errfd);