Skip to content

Commit

Permalink
Ensure there is a '/' between PPP_PATH_VARRUN and the PID filename (#427
Browse files Browse the repository at this point in the history
)

Bug: https://bugs.gentoo.org/907311

Fixes: 66a8c74 ("Let ./configure control the paths for pppd", 2022-07-30)
Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym authored Jun 26, 2023
1 parent ba45e71 commit 091e69b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pppd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ create_pidfile(int pid)
{
FILE *pidfile;

slprintf(pidfilename, sizeof(pidfilename), "%s%s.pid",
slprintf(pidfilename, sizeof(pidfilename), "%s/%s.pid",
PPP_PATH_VARRUN, ifname);
if ((pidfile = fopen(pidfilename, "w")) != NULL) {
fprintf(pidfile, "%d\n", pid);
Expand All @@ -907,7 +907,7 @@ create_linkpidfile(int pid)
if (linkname[0] == 0)
return;
ppp_script_setenv("LINKNAME", linkname, 1);
slprintf(linkpidfile, sizeof(linkpidfile), "%sppp-%s.pid",
slprintf(linkpidfile, sizeof(linkpidfile), "%s/ppp-%s.pid",
PPP_PATH_VARRUN, linkname);
if ((pidfile = fopen(linkpidfile, "w")) != NULL) {
fprintf(pidfile, "%d\n", pid);
Expand Down

0 comments on commit 091e69b

Please sign in to comment.