lib/replace: avoid using libbsd for builtin linking
This is similar to commit
66e90b7391bd404580f3919c4f2b8625c9c89c0e:
nsswitch: reduce dependecies to private libraries and link static/builtin if possible
There we tried to hide our internal symbols from applications loading
our plugins (e.g. libnss_winbind.so.2 or pam_winbind.so)
If we find libbsd in the system we link our plugins against it
and inject the symbols from it into the application, as the
symbols in libbsd have very common names, there's a change to
generate symbol conflicts causing unexpected behavior.
So we better use our own replacement functions from lib/replace
for the plugins instead of using the ones from libbsd
as we most likely not really need them. Currently we only
seem to use strlcpy() and we have our own version of it...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15475
Signed-off-by: Stefan Metzmacher <metze@samba.org>