summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.7/0019-Bug-284382-ppp-linkpidfile-is-not-created-upon-detac.patch
blob: f785c75d87bb0a18cfcba233be874e9949be80f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: "herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>
Date: Sat, 28 Sep 2019 08:11:49 +0200
Subject: [PATCH] Bug#284382: ppp: linkpidfile is not created upon detachment

Package: ppp
Version: 2.4.2+20040428-2
Severity: wishlist

When pppd detaches from the parent normally, that is, without nodetach
or updetach set, the linkpidfile is not created even when linkname is
set.

This is because the create_linkpidfile call in detach() is only made
if the linkpidfile is filled in.  However, linkpidfile is never filled
in until create_linkpidfile has been called.

IMHO the call should be made uncondtionally in detach() since
create_linkpidfile does its own check on linkname anyway.

Please note that the version of pppd in woody always wrote the
linkpidfile after detaching.  It did so in main() however.  That
call has now been removed which is why I'm seeing this problem.

[...]

--

Imported from ppp_2.4.7-2+4.1.debian.tar.xz

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 pppd/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pppd/main.c b/pppd/main.c
index 76b67d2485b7..8e31365f0c58 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -765,8 +765,7 @@ detach()
 	/* update pid files if they have been written already */
 	if (pidfilename[0])
 	    create_pidfile(pid);
-	if (linkpidfile[0])
-	    create_linkpidfile(pid);
+	create_linkpidfile(pid);
 	exit(0);		/* parent dies */
     }
     setsid();