104-debian_fix_linkpidfile.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Subject: Bug#284382: ppp: linkpidfile is not created upon detachment
  2. From: <[email protected]>
  3. Package: ppp
  4. Version: 2.4.2+20040428-2
  5. Severity: wishlist
  6. When pppd detaches from the parent normally, that is, without nodetach
  7. or updetach set, the linkpidfile is not created even when linkname is
  8. set.
  9. This is because the create_linkpidfile call in detach() is only made
  10. if the linkpidfile is filled in. However, linkpidfile is never filled
  11. in until create_linkpidfile has been called.
  12. IMHO the call should be made uncondtionally in detach() since
  13. create_linkpidfile does its own check on linkname anyway.
  14. Please note that the version of pppd in woody always wrote the
  15. linkpidfile after detaching. It did so in main() however. That
  16. call has now been removed which is why I'm seeing this problem.
  17. [...]
  18. --
  19. Index: ppp-2.4.3/pppd/main.c
  20. ===================================================================
  21. --- ppp-2.4.3.orig/pppd/main.c 2007-06-04 13:22:09.004486392 +0200
  22. +++ ppp-2.4.3/pppd/main.c 2007-06-04 13:22:10.548251704 +0200
  23. @@ -768,8 +768,7 @@
  24. /* update pid files if they have been written already */
  25. if (pidfilename[0])
  26. create_pidfile(pid);
  27. - if (linkpidfile[0])
  28. - create_linkpidfile(pid);
  29. + create_linkpidfile(pid);
  30. exit(0); /* parent dies */
  31. }
  32. setsid();