If LOCALSTATEDIR is inaccessible, store the pid and socket files in the configuration...
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 May 2015 20:17:18 +0000 (22:17 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 May 2015 20:17:18 +0000 (22:17 +0200)
commit60fbdb3f2cf0216afb2cfcc2c4128fb5765471ac
tree88fc347a9568c83309f0155637f4fe35adfa48ea
parentdece2db78e2c4ccd6e617e69195754639b086170
If LOCALSTATEDIR is inaccessible, store the pid and socket files in the configuration directory.

The compile time local state directory is usually /var or
/usr/local/var. If this is not accessible for some reason, for example
because someone ./configured tinc without --localstatedir and
/usr/local/var does not exist, or if tinc is started by a non-root user,
then tinc will fall back to the directory where tinc.conf is stored.
A warning is logged when this happens.
src/names.c