We build variants of kinit and test_acquire_cred that define their own symbols rk_dns_lookup, gethostbyname, gethostbyname2, and getaddrinfo to print a message and abort. For getaddrinfo, we abort only if the caller failed to specify AI_NUMERICHOST; otherwise we use dlsym(RTLD_NEXT, "getaddrinfo") instead. The new test tests/gss/check-nodns is like tests/gss/check-basic, but uses kinit_auditdns and test_acquire_cred_auditdns to verify that no DNS resolution happens. This test should work and be effective on ELF platforms where the getaddrinfo function is implemented by the symbol `getaddrinfo'. On non-ELF platforms it may not be effective -- and on platforms where the getaddrinfo function is implemented by another symbol (like `__getaddrinfo50') it may not work, but we can cross that bridge when we come to it. Verified manually that the test fails, with the expected error message and abort, without `block_dns = yes' in krb5-nodns.conf. No automatic test of the mechanism for now because it might not work on some platforms. XXX check-nodns.in is copypasta of check-basic.in, should factor out the common parts so they don't get out of sync.
118 lines
3.1 KiB
Makefile
118 lines
3.1 KiB
Makefile
# $Id$
|
|
|
|
include $(top_srcdir)/Makefile.am.common
|
|
|
|
.NOTPARALLEL:
|
|
|
|
noinst_DATA = krb5.conf krb5-nodns.conf new_clients_k5.conf mech
|
|
|
|
SCRIPT_TESTS = check-basic check-nodns check-gss check-gssmask check-context check-spnego check-ntlm check-negoex
|
|
|
|
TESTS = $(SCRIPT_TESTS)
|
|
|
|
check_SCRIPTS = $(SCRIPT_TESTS)
|
|
|
|
port = 49188
|
|
|
|
do_subst = srcdirabs=`cd "$(srcdir)"; pwd`; objdirabs=`pwd`; sed \
|
|
-e 's,[@]srcdir[@],$(srcdir),g' \
|
|
-e "s,[@]srcdirabs[@],$${srcdirabs},g" \
|
|
-e 's,[@]env_setup[@],$(top_builddir)/tests/bin/setup-env,g' \
|
|
-e 's,[@]port[@],$(port),g' \
|
|
-e 's,[@]objdir[@],$(top_builddir)/tests/gss,g' \
|
|
-e "s,[@]objdirabs[@],$${objdirabs},g"
|
|
|
|
check-gss: check-gss.in Makefile
|
|
$(do_subst) < $(srcdir)/check-gss.in > check-gss.tmp && \
|
|
chmod +x check-gss.tmp && \
|
|
mv check-gss.tmp check-gss
|
|
|
|
check-gssmask: check-gssmask.in Makefile
|
|
$(do_subst) < $(srcdir)/check-gssmask.in > check-gssmask.tmp && \
|
|
chmod +x check-gssmask.tmp && \
|
|
mv check-gssmask.tmp check-gssmask
|
|
|
|
check-context: check-context.in Makefile
|
|
$(do_subst) < $(srcdir)/check-context.in > check-context.tmp && \
|
|
chmod +x check-context.tmp && \
|
|
mv check-context.tmp check-context
|
|
|
|
check-spnego: check-spnego.in Makefile
|
|
$(do_subst) < $(srcdir)/check-spnego.in > check-spnego.tmp && \
|
|
chmod +x check-spnego.tmp && \
|
|
mv check-spnego.tmp check-spnego
|
|
|
|
check-basic: check-basic.in Makefile
|
|
$(do_subst) < $(srcdir)/check-basic.in > check-basic.tmp && \
|
|
chmod +x check-basic.tmp && \
|
|
mv check-basic.tmp check-basic
|
|
|
|
check-nodns: check-nodns.in Makefile
|
|
$(do_subst) < $(srcdir)/check-nodns.in > check-nodns.tmp && \
|
|
chmod +x check-nodns.tmp && \
|
|
mv check-nodns.tmp check-nodns
|
|
|
|
check-ntlm: check-ntlm.in Makefile
|
|
$(do_subst) < $(srcdir)/check-ntlm.in > check-ntlm.tmp && \
|
|
chmod +x check-ntlm.tmp && \
|
|
mv check-ntlm.tmp check-ntlm
|
|
|
|
check-negoex: check-negoex.in Makefile
|
|
$(do_subst) < $(srcdir)/check-negoex.in > check-negoex.tmp && \
|
|
chmod +x check-negoex.tmp && \
|
|
mv check-negoex.tmp check-negoex
|
|
|
|
krb5.conf: krb5.conf.in Makefile
|
|
$(do_subst) < $(srcdir)/krb5.conf.in > krb5.conf.tmp && \
|
|
mv krb5.conf.tmp krb5.conf
|
|
|
|
krb5-nodns.conf: krb5-nodns.conf.in Makefile
|
|
$(do_subst) < $(srcdir)/krb5-nodns.conf.in > krb5-nodns.conf.tmp && \
|
|
mv krb5-nodns.conf.tmp krb5-nodns.conf
|
|
|
|
new_clients_k5.conf: new_clients_k5.conf.in Makefile
|
|
$(do_subst) < $(srcdir)/new_clients_k5.conf.in > new_clients_k5.conf.tmp && \
|
|
mv new_clients_k5.conf.tmp new_clients_k5.conf
|
|
|
|
mech: mech.in Makefile
|
|
$(do_subst) < $(srcdir)/mech.in > mech.tmp && \
|
|
mv mech.tmp mech
|
|
|
|
CLEANFILES= \
|
|
$(TESTS) \
|
|
foopassword \
|
|
barpassword \
|
|
krb5ccfile \
|
|
krb5ccfile-ds \
|
|
server.keytab \
|
|
krb5.conf \
|
|
krb5-nodns.conf \
|
|
new_clients_k5.conf \
|
|
mech \
|
|
current-db* \
|
|
*.log \
|
|
tempfile \
|
|
check-basic.tmp \
|
|
check-nodns.tmp \
|
|
check-gss.tmp \
|
|
check-gssmask.tmp \
|
|
check-spnego.tmp \
|
|
check-ntlm.tmp \
|
|
check-context.tmp
|
|
|
|
EXTRA_DIST = \
|
|
NTMakefile \
|
|
check-basic.in \
|
|
check-nodns.in \
|
|
check-gss.in \
|
|
check-gssmask.in \
|
|
check-spnego.in \
|
|
check-ntlm.in \
|
|
check-context.in \
|
|
check-negoex.in \
|
|
ntlm-user-file.txt \
|
|
krb5.conf.in \
|
|
include-krb5.conf \
|
|
new_clients_k5.conf.in \
|
|
mech.in
|