* tools/nss/libvirt_nss.[ch]: add BSD-comptabile wrappers and
register via the nss_module_register() interface
* m4/virt-nss.m4: add checks if we're building NSS for FreeBSD
* tools/Makefile.am: handle target library name differences, as
Linux needs libnss_libvirt.so.2 and FreeBSD needs
nss_libvirt.so.1. Also, different syms files have to be used
as Linux needs to export all the methods while FreeBSD
only needs to have nss_module_register()
* tests/nsstest.c, tests/nssmock.c: s/__linux__/NSS/
* tests/nssmock.c: pass int instead of mode_t to va_arg() to please
gcc 4.8
* libvirt_nss_bsd.syms: FreeBSD syms file
Name Service Switch is a glibc feature responsible for many
things. Translating domain names into IP addresses and vice versa
is just one of them. However, currently it's the only
functionality that this commit is tickling. Well, in this commit
the plugin skeleton is introduced. Implementation to come in next
patches.
Because of the future testing, where the implementation is to be
linked with a test, this needs to go into static library. Linking
a program with an .so statically is not portable. Therefore a
dummy libnss_libvirt_impl library is being introduced too.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>