Skip to content

Commit

Permalink
Revert lock path to /var/lock (#435)
Browse files Browse the repository at this point in the history
lock dir changed on linux from /var/lock to /run/pppd/lock with
pppd-2.5.0, which makes pppd fail to start if the distribution does not
pre-create the directory.

This reverts it back to /var/lock.

The paths for other OS should be identical as LOCALSTATEDIR should be
/var, but also revert them back as well just in case.
Since the variable is no longer used remove it from makefiles.

Fixes: 66a8c74 ("Let ./configure control the paths for pppd")
Fixes: #419

Signed-off-by: Dominique Martinet <[email protected]>
Co-authored-by: Dominique Martinet <[email protected]>
  • Loading branch information
martinetd and martinetd authored Oct 10, 2023
1 parent edc1926 commit 99cbf5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pppd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pppd_SOURCES = \
upap.c \
utils.c

pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
pppd_LDFLAGS =
pppd_LIBS =

Expand Down
6 changes: 3 additions & 3 deletions pppd/pathnames.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@
#define PPP_PATH_PPPDB PPP_PATH_VARRUN "/pppd2.tdb"

#ifdef __linux__
#define PPP_PATH_LOCKDIR PPP_PATH_VARRUN "/lock"
#define PPP_PATH_LOCKDIR "/var/lock"
#else
#ifdef SVR4
#define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/locks"
#define PPP_PATH_LOCKDIR "/var/spool/locks"
#else
#define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/lock"
#define PPP_PATH_LOCKDIR "/var/spool/lock"
#endif
#endif

Expand Down

0 comments on commit 99cbf5e

Please sign in to comment.