1 sys_init() will open a socket and keep it open for the whole like of the
2 process. If pppd is started without all standard fds open then the socket
3 will get one of their numbers, which will be clobbered later by the
4 /dev/null fd duplicated by main().
6 See Debian bug #235192.
8 diff -ruN ppp.orig/pppd/main.c ppp/pppd/main.c
9 --- ppp.orig/pppd/main.c 2004-02-29 18:50:12.000000000 +0100
10 +++ ppp/pppd/main.c 2004-02-29 18:48:56.000000000 +0100
16 - * Initialize system-dependent stuff.
20 /* Make sure fds 0, 1, 2 are open to somewhere. */
21 fd_devnull = open(_PATH_DEVNULL, O_RDWR);
28 + * Initialize system-dependent stuff.
33 pppdb = tdb_open(_PATH_PPPDB, 0, 0, O_RDWR|O_CREAT, 0644);