server: remove extra '/run' subdir from paths
Having extra '/run' subdirectory hardcoded into paths used for options 'digest-file', 'pid-file', 'run-dir' is counterintuitive and can lead to bogus directory layouts when 'localstatedir' differs from the default value. For example, if 'localstatedir' is set to '/run', which is a common and recommended substitute for /var/run in many distros nowadays, then fwknop files will be placed under /run/run/fwknop. This changeset removes extra '/run' subdirectory from all relevant paths by changing DEF_RUN_DIR. Default value of 'localstatedir' is changed to '/var/run' so users who relied on the previous behaviour won't have to bother changing anything. This is tested and works. Gentoo have this patch applied since 2.6.0.
This commit is contained in:
+5
-5
@@ -94,7 +94,7 @@ Specify the location of the
|
||||
file\&. If this option is not given,
|
||||
\fIfwknopd\fR
|
||||
will use the compile\-time default location (typically
|
||||
\fI@localstatedir@/run/fwknop/digest\&.cache\fR)\&.
|
||||
\fI@localstatedir@/fwknop/digest\&.cache\fR)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-D, \-\-dump\-config\fR
|
||||
@@ -196,7 +196,7 @@ Specify the location of the
|
||||
\fIfwknopd\&.pid\fR
|
||||
file\&. If this option is not given,
|
||||
\fIfwknopd\fR
|
||||
will use the compile\-time default location (typically \*(Aq@localstatedir@/run/fwknop/fwknopd\&.pid)\&.
|
||||
will use the compile\-time default location (typically \*(Aq@localstatedir@/fwknop/fwknopd\&.pid)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-P, \-\-pcap\-filter\fR=\fI<filter>\fR
|
||||
@@ -244,7 +244,7 @@ files\&. This will also force a flush of the current \(lqFWKNOP\(rq iptables cha
|
||||
\fB\-\-rotate\-digest\-cache\fR
|
||||
.RS 4
|
||||
Rotate the digest cache file by renaming it to \(lq<name>\-old\(rq, and starting a new one\&. The digest cache file is typically found in
|
||||
\fI@localstatedir@/run/fwknop/digest\&.cache\fR\&.
|
||||
\fI@localstatedir@/fwknop/digest\&.cache\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-r, \-\-run\-dir\fR=\fI<path>\fR
|
||||
@@ -252,7 +252,7 @@ Rotate the digest cache file by renaming it to \(lq<name>\-old\(rq, and starting
|
||||
Specify the directory where
|
||||
\fBfwknopd\fR
|
||||
writes run time state files\&. The default is
|
||||
\fI@localstatedir@/run\fR\&.
|
||||
\fI@localstatedir@\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-S, \-\-status\fR
|
||||
@@ -524,7 +524,7 @@ Override syslog facility\&. The \(lqSYSLOG_FACILITY\(rq variable can be set to
|
||||
Specify the directory where
|
||||
\fBfwknopd\fR
|
||||
writes run time state files\&. The default is
|
||||
\fI@localstatedir@/run\fR\&.
|
||||
\fI@localstatedir@\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_DESTINATION_RULE\fR \fI<Y/N>\fR
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
/* Our default run directory is based on LOCALSTATEDIR as set by the
|
||||
* configure script. This is where we put the PID and digest cache files.
|
||||
*/
|
||||
#define DEF_RUN_DIR SYSRUNDIR"/run/"PACKAGE_NAME
|
||||
#define DEF_RUN_DIR SYSRUNDIR"/"PACKAGE_NAME
|
||||
#endif
|
||||
|
||||
/* More Conf defaults
|
||||
|
||||
Reference in New Issue
Block a user