Open execution log file descriptor on every write. #4378

(cherry picked from commit 3ed72bf0475dc86dc6e15a97a2ed6fb7d74ae79a)
Leak fix.

(cherry picked from commit b99a821acad5b7043f2d9a2e54ba8e5b57da36e8)
Remove unused global reference.

(cherry picked from commit 6bdc8f194ace7e630638fb6b435addf01411a430)
We now log in verbose when purging old connections

It shouldn't happen anyway. Also refactored the function a bit to make
it more readable, it now has only one exit point: its end.

(cherry picked from commit 0d81882fc298e6a165a6332a44449d818b4bbf62)
In case of error from PreprocessRequestPath() errno is not always set.

(cherry picked from commit 646394686664fbb9386e1b91a843a783ac18e98d)
access_rules: trailing slashdot signifies a directory, just like trailing slash. Redmine #5775.

(cherry picked from commit ce33efe2a2807c58535c646ecf6b89666fe3aefd)
Rename dest_file_latest to destination_file in acceptance tests where latest protocol is all we test.

(cherry picked from commit 42705bc042c8fec583ccf57242faf47180092246)
Remove the protocol latest parameter in body copy from, for acceptance tests that apply only to the latest protocol.

(cherry picked from commit d40cb974c1ac1c333797e85618ae93c26e7f6e57)
Add acceptance tests for recursively admitted directories in access_rules.

Test access_rules for inexistent directories, with recursive access
being signified as such by either trailing slash or trailing
slashdot. Also test denial of specific files within the recursively
admitted directories.

(cherry picked from commit cdc836a55eb449fbdf138ef65222f2fb46dcec1d)
The reference to the list must not be NULL.

(cherry picked from commit 70623c6521c43156263804fb861868aa25aed8b2)
Correct vzps usage

(cherry picked from commit c7d627d12a7c05cbf038ef88d393168d16a77541)
Fix incorrect function documentation.

getline() cannot return 0, but CfReadLine can, because it removes the
newline and the line can then be empty.

(cherry picked from commit 315b3a13fcdf34631603838af2cb8ef4b156ddd0)
Prevent user home dir creation on systems that try to enforce it.

Some systems (CentOS 6.4, for instance) have the default policy to
create the home directory whenever "useradd" is called. But we want
the home_bundle attribute to do this, so we need to prevent it.The
parameter to prevent this is "-M", but it is not available everywhere,
so we call useradd with the --help parameter first to see if it is in
the list of options.

Redmine #5781.

(cherry picked from commit 9ce44be5c5f39cb90ab43a1ca295c5aa67a0afa8)
Redmine #5721: Fix users promises getting confused by NIS or NSS.

getpwnam() will return remote user information if NIS or NSS is
configured as the primary user DB, but we want it to return local user
information. Fix by opening /etc/passwd manually and using
fgetpwent().

(cherry picked from commit 3e8b6898fd1419199de05d18a6b54edd309897a4)
tests/unit: fix file_writer test on Mac OS X (Darwin) because of clang

(cherry picked from commit e1843a13d7d50cd5fcca433c6b5282d0dcca5aa1)