"nsupdate" failures due to missing gssapi binding
I need to setup a Docker image with a Samba domain controller installed. To set this image up I followed the instructions from this guide: https://wiki.alpinelinux.org/wiki/Setting\_up\_a\_samba-ad-dc.
When I run the container I get the following errors multiple times:
/usr/sbin/samba_dnsupdate: /usr/bin/nsupdate: cannot specify -g or -o, program not linked with GSS API Library
../source4/dsdb/dns/dns_update.c:290: Failed DNS update - with error code 25
This happens because of a missing configure
option
(https://git.alpinelinux.org/cgit/aports/tree/main/bind/APKBUILD\#n72):
--with-gssapi=yes
If one only adds this switch to the APKGBUILD
the build fails with the
given error:
libtool: link: gcc -Os -fomit-frame-pointer -D_GNU_SOURCE -I/usr/include/libxml2 -fPIC -Wl,--as-needed -o .libs/resolve .libs/resolve.o ../irs/.libs/libirs.so -L/lib ../dns/.libs/libdns.so ../isccfg/.libs/libisccfg.so /tmp/aports/main/bind/src/bind-9.12.1-P2/lib/dns/.libs/libdns.so -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err /tmp/aports/main/bind/src/bind-9.12.1-P2/lib/isc/.libs/libisc.so ../isc/.libs/libisc.so -lcrypto -ldl -lcap -ljson-c -lpthread -lxml2 -lz -lm
../dns/.libs/libdns.so: undefined reference to `RSA_set0_factors'
../dns/.libs/libdns.so: undefined reference to `RSA_set0_crt_params'
../dns/.libs/libdns.so: undefined reference to `RSA_get0_factors'
../dns/.libs/libdns.so: undefined reference to `DSA_set0_pqg'
../dns/.libs/libdns.so: undefined reference to `DH_set0_key'
../dns/.libs/libdns.so: undefined reference to `DH_clear_flags'
../dns/.libs/libdns.so: undefined reference to `ECDSA_SIG_get0'
../dns/.libs/libdns.so: undefined reference to `ECDSA_SIG_set0'
../dns/.libs/libdns.so: undefined reference to `RSA_test_flags'
../dns/.libs/libdns.so: undefined reference to `DH_set0_pqg'
../dns/.libs/libdns.so: undefined reference to `DSA_SIG_get0'
../dns/.libs/libdns.so: undefined reference to `DSA_set0_key'
../dns/.libs/libdns.so: undefined reference to `DSA_get0_key'
../dns/.libs/libdns.so: undefined reference to `RSA_get0_key'
../dns/.libs/libdns.so: undefined reference to `DSA_SIG_set0'
../dns/.libs/libdns.so: undefined reference to `DSA_clear_flags'
../dns/.libs/libdns.so: undefined reference to `DH_get0_key'
../dns/.libs/libdns.so: undefined reference to `RSA_get0_crt_params'
../dns/.libs/libdns.so: undefined reference to `DSA_get0_pqg'
../dns/.libs/libdns.so: undefined reference to `DH_get0_pqg'
../dns/.libs/libdns.so: undefined reference to `RSA_set0_key'
Switching to “openssl” makes the build succeed:
sed -i \
-e 's/libressl-dev/openssl-dev/g' \
-e 's/makedepends="/makedepends="krb5-dev /' \
-e '/libressl[^.]\+\.patch/d' \
-e '/tools() {/,/}/s/depends=""/depends="krb5"/' \
-e '/.\/configure/a\ --with-gssapi=yes --with-dlopen \\' \
APKBUILD
With the new build, the errors state a the beginning of this issue are gone.
(from redmine: issue id 8999, created on 2018-06-13, closed on 2019-06-19)