]> git.ozlabs.org Git - ppp.git/commitdiff
Revert lock path to /var/lock (#435)
authorDominique Martinet <asmadeus@codewreck.org>
Tue, 10 Oct 2023 01:05:50 +0000 (10:05 +0900)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 01:05:50 +0000 (12:05 +1100)
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: 66a8c74c3f73 ("Let ./configure control the paths for pppd")
Fixes: #419
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
Co-authored-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
pppd/Makefile.am
pppd/pathnames.h

index e5bedf26af963325edfb9852864249a0765b42bd..7cb30053322ef6df756e8af7990a465e2ef2d8ad 100644 (file)
@@ -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 =
 
index de2fb6889005103c7735315fb230469e7f3fce34..12609a969429fc9d148284d98f6207617c152c81 100644 (file)
 #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