summaryrefslogtreecommitdiff
path: root/obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-24 23:50:14 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-24 23:50:14 +0000
commit097635b79bc6ddd6066a8369db6e298a25daa96e (patch)
treedb8218863c9124ae287832ccd846ad4d96c2e05e /obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds
parent54da0f9e4ba892d2613d4f0d0c4bf4eecdcfd0a4 (diff)
massive changes
- sstrip cleanup from mjn3 - various patches from nico and others: http://openwrt.org/forum/viewtopic.php?t=368 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@145 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds')
-rw-r--r--obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds34
1 files changed, 34 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds b/obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds
new file mode 100644
index 0000000000..39208ab4db
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/patches/ppp/fix_closed_fds
@@ -0,0 +1,34 @@
+sys_init() will open a socket and keep it open for the whole like of the
+process. If pppd is started without all standard fds open then the socket
+will get one of their numbers, which will be clobbered later by the
+/dev/null fd duplicated by main().
+
+See Debian bug #235192.
+
+diff -ruN ppp.orig/pppd/main.c ppp/pppd/main.c
+--- ppp.orig/pppd/main.c 2004-02-29 18:50:12.000000000 +0100
++++ ppp/pppd/main.c 2004-02-29 18:48:56.000000000 +0100
+@@ -385,11 +385,6 @@
+ if (dryrun)
+ die(0);
+
+- /*
+- * Initialize system-dependent stuff.
+- */
+- sys_init();
+-
+ /* Make sure fds 0, 1, 2 are open to somewhere. */
+ fd_devnull = open(_PATH_DEVNULL, O_RDWR);
+ if (fd_devnull < 0)
+@@ -401,6 +396,11 @@
+ fd_devnull = i;
+ }
+
++ /*
++ * Initialize system-dependent stuff.
++ */
++ sys_init();
++
+ #ifdef USE_TDB
+ pppdb = tdb_open(_PATH_PPPDB, 0, 0, O_RDWR|O_CREAT, 0644);
+ if (pppdb != NULL) {