update ppp to v2.4.4 (#5102)
[openwrt/openwrt.git] / package / ppp / patches / 102-debian_fix_close_fd0.patch
1 diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
2 --- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:49:34.000000000 -0400
3 +++ ppp-2.4.4/pppd/main.c 2009-05-07 15:53:42.000000000 -0400
4 @@ -1570,6 +1570,8 @@
5 if (errfd == 0 || errfd == 1)
6 errfd = dup(errfd);
7
8 + closelog();
9 +
10 /* dup the in, out, err fds to 0, 1, 2 */
11 if (infd != 0)
12 dup2(infd, 0);
13 @@ -1578,7 +1580,6 @@
14 if (errfd != 2)
15 dup2(errfd, 2);
16
17 - closelog();
18 if (log_to_fd > 2)
19 close(log_to_fd);
20 if (the_channel->close)
21 diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
22 --- ppp-2.4.4.orig/pppd/main.c 2009-05-07 15:49:34.000000000 -0400
23 +++ ppp-2.4.4/pppd/main.c 2009-05-07 15:53:42.000000000 -0400
24 @@ -1570,6 +1570,8 @@
25 if (errfd == 0 || errfd == 1)
26 errfd = dup(errfd);
27
28 + closelog();
29 +
30 /* dup the in, out, err fds to 0, 1, 2 */
31 if (infd != 0)
32 dup2(infd, 0);
33 @@ -1578,7 +1580,6 @@
34 if (errfd != 2)
35 dup2(errfd, 2);
36
37 - closelog();
38 if (log_to_fd > 2)
39 close(log_to_fd);
40 if (the_channel->close)