file-logger: Set owner/group of log file
authorTobias Brunner <tobias@strongswan.org>
Tue, 14 Apr 2020 08:31:49 +0000 (10:31 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 7 May 2020 07:30:57 +0000 (09:30 +0200)
commitb06374f6a518584fc40f58e42dae14ee93f645f2
tree0ed479031a5444206b7e85c4bc210e392fd96290
parentdb772305c6baa01f6c6750be74733e4bfc1d6106
file-logger: Set owner/group of log file

The file is usually opened/created by root, however, if user/group IDs
are configured and the configuration is reloaded, the file will be reopened
as configured user.  Like with UNIX sockets we only attempt to change
the user if we have CAP_CHOWN allowing a start as regular user.

We don't have chown() on Windows, so check for it.
configure.ac
src/libcharon/bus/listeners/file_logger.c