autofs-5.0.9 - fix mistake in assignment

Fix an obvious mistake in an accumulation assignment.
autofs-5.0.9 - check for non existent negative entries in lookup_ghost()

Map entries that have been created in the cache due to a negative lookup
but don't exist in the map source shouldn't have directories created.

This can be detected by checking me->status.

For negative entries that are present in the map source me->status will
have been set to 0 in lookup_prune_one_cache() and negavive entries that
have been created in the same second as the map read will always have
me->status > 0 and so will also be skipped by lookup_ghost().
autofs-5.0.9 - fix reset flex scan buffer on init

If a scan results in an error the flex scan buffer is sometimes
not properly reset for the next scan.

This can result in an incorrect success return for a subsequent
operation, such as a map re-read, for a master map line that's
actually incorrect. Given the success return autofs tries to add
a master map entry that doesn't have the needed information, such
as the mount path, and a SEGV results.
autofs-5.0.9 - wait for master map available at start

If the network map source isn't available at start the master map
can't be read. In this case we should wait until it is available
so we can get a startup map.
autofs-5.0.9 - add master read wait option

Add command line and configuration options to set the amount of time to
wait for the master map to become available at program start.
autofs-5.0.9 - add serialization to sasl init

Attempt to resolve crash in sasl initialization. We know that the
initial connection calls to connect to an LDAP server are not
thread safe and it looks like the sasl code doesn't take that into
consideration so adding serialization with a mutex is probably a
sensible thing to do.
autofs-5.0.9 - dont allocate dev_ctl_ops too early

If the standard io file descriptors have been closed by the cloning
process the file handle for autofs device control can correspond to
a descriptor number of one of the standard io descriptors which will
be closed when the process is daemonized.

Avoid this by closing the device control descriptor opened when
performing sanity checks at startup so that it can be opened
on a higher numbered file descriptor after the process has switched
to daemon mode.
autofs-5.0.9 - fix race accessing qdn in get_query_dn()

Fix a couple of obvious problems in get_query_dn().

First, check dn is not NULL before attempting to duplicate it.
And also protect the update of qdn in the context by a mutex.
autofs-5.0.9 - fix incorrect round robin host detection
autofs-5.0.9 - fix memory leak in create_client()

In create_client(), if the target host is unreachable the function
exists without freeing the addrinfo data returned from getaddrinfo(3).
autofs-5.0.9 - fix memory leak in get_exports()

In modules/lookup_hosts.c:get_exports() looping over the returned list of
exports uses the pointer that contains the list. The pointer is updated
in the process of creating the exports multi-mount so a pointer to the
returned list is no longer available to be freed when done.
autofs-5.0.9 - fix typo in flagdir configure option

This problem was originally reported, and a patch offered, by
Michael Tokarev but was inadvertantly missed, so the change is
credited to him in retrospect.
autofs-5.0.9 - clarify multiple mounts description

Try and clarify the "Multiple Mounts" and "Replicated Server" sections
in the autofs(5) man page.
autofs-5.0.9 - gaurd against incorrect umount return

If umount(8) returns a fail but the mount is actually umounted autofs
can incorrectly try reconstruct mount triggers. This can lead to the
automount point becoming unresponsive.
autofs-5.0.9 - update man page autofs(8) for systemd

Update the autofs(8) man page to account for systems using systemd.