mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r9859: Enable (blocking) KDC resolution with DNS.
To enable, set:
[libdefaults]
dns_lookup_realm = true
dns_lookup_kdc = true
in your /etc/krb5.conf.
In the future I may override the krb5.conf and set this on by default
in Samba4.
Andrew Bartlett
(This used to be commit 32fb50d025
)
This commit is contained in:
parent
1b5cb7309d
commit
1478781603
9
source4/heimdal/cf/find-func-no-libs.m4
Normal file
9
source4/heimdal/cf/find-func-no-libs.m4
Normal file
@ -0,0 +1,9 @@
|
||||
dnl $Id: find-func-no-libs.m4,v 1.6 2004/02/12 14:20:45 lha Exp $
|
||||
dnl
|
||||
dnl
|
||||
dnl Look for function in any of the specified libraries
|
||||
dnl
|
||||
|
||||
dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
|
||||
AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
|
||||
AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
|
63
source4/heimdal/cf/find-func-no-libs2.m4
Normal file
63
source4/heimdal/cf/find-func-no-libs2.m4
Normal file
@ -0,0 +1,63 @@
|
||||
dnl $Id: find-func-no-libs2.m4,v 1.9 2004/08/26 12:35:42 joda Exp $
|
||||
dnl
|
||||
dnl
|
||||
dnl Look for function in any of the specified libraries
|
||||
dnl
|
||||
|
||||
dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
|
||||
AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
|
||||
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_CACHE_VAL(ac_cv_funclib_$1,
|
||||
[
|
||||
if eval "test \"\$ac_cv_func_$1\" != yes" ; then
|
||||
ac_save_LIBS="$LIBS"
|
||||
for ac_lib in $2; do
|
||||
case "$ac_lib" in
|
||||
"") ;;
|
||||
yes) ac_lib="" ;;
|
||||
no) continue ;;
|
||||
-l*) ;;
|
||||
*) ac_lib="-l$ac_lib" ;;
|
||||
esac
|
||||
LIBS="$6 $ac_lib $5 $ac_save_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$3]],[[$1($4)]])],[eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break])
|
||||
done
|
||||
eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
])
|
||||
|
||||
eval "ac_res=\$ac_cv_funclib_$1"
|
||||
|
||||
if false; then
|
||||
AC_CHECK_FUNCS($1)
|
||||
dnl AC_CHECK_LIBS($2, foo)
|
||||
fi
|
||||
# $1
|
||||
eval "ac_tr_func=HAVE_[]upcase($1)"
|
||||
eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
|
||||
eval "LIB_$1=$ac_res"
|
||||
|
||||
case "$ac_res" in
|
||||
yes)
|
||||
eval "ac_cv_func_$1=yes"
|
||||
eval "LIB_$1="
|
||||
AC_DEFINE_UNQUOTED($ac_tr_func)
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
no)
|
||||
eval "ac_cv_func_$1=no"
|
||||
eval "LIB_$1="
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
*)
|
||||
eval "ac_cv_func_$1=yes"
|
||||
eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
|
||||
AC_DEFINE_UNQUOTED($ac_tr_func)
|
||||
AC_DEFINE_UNQUOTED($ac_tr_lib)
|
||||
AC_MSG_RESULT([yes, in $ac_res])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(LIB_$1)
|
||||
])
|
9
source4/heimdal/cf/find-func.m4
Normal file
9
source4/heimdal/cf/find-func.m4
Normal file
@ -0,0 +1,9 @@
|
||||
dnl $Id: find-func.m4,v 1.2 2004/02/12 14:20:47 lha Exp $
|
||||
dnl
|
||||
dnl AC_FIND_FUNC(func, libraries, includes, arguments)
|
||||
AC_DEFUN([AC_FIND_FUNC], [
|
||||
AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
|
||||
if test -n "$LIB_$1"; then
|
||||
LIBS="$LIB_$1 $LIBS"
|
||||
fi
|
||||
])
|
104
source4/heimdal/cf/resolv.m4
Normal file
104
source4/heimdal/cf/resolv.m4
Normal file
@ -0,0 +1,104 @@
|
||||
dnl stuff used by DNS resolv code
|
||||
|
||||
AC_DEFUN([rk_RESOLV], [
|
||||
|
||||
AC_CHECK_HEADERS(resolv.h, , , [AC_INCLUDES_DEFAULT
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_FIND_FUNC(res_search, resolv,
|
||||
[
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
#include <resolv.h>
|
||||
#endif
|
||||
],
|
||||
[0,0,0,0,0])
|
||||
|
||||
AC_FIND_FUNC(res_nsearch, resolv,
|
||||
[
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
#include <resolv.h>
|
||||
#endif
|
||||
],
|
||||
[0,0,0,0,0,0])
|
||||
|
||||
AC_FIND_FUNC(res_ndestroy, resolv,
|
||||
[
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
#include <resolv.h>
|
||||
#endif
|
||||
],
|
||||
[0])
|
||||
|
||||
AC_FIND_FUNC(dn_expand, resolv,
|
||||
[
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
#include <resolv.h>
|
||||
#endif
|
||||
],
|
||||
[0,0,0,0,0])
|
||||
|
||||
rk_CHECK_VAR(_res,
|
||||
[#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
#include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
#include <resolv.h>
|
||||
#endif])
|
||||
|
||||
])
|
@ -175,6 +175,30 @@ rk_CHECK_VAR(h_errno,
|
||||
#include <netdb.h>
|
||||
#endif])
|
||||
|
||||
sinclude(heimdal/cf/find-func.m4)
|
||||
sinclude(heimdal/cf/find-func-no-libs.m4)
|
||||
sinclude(heimdal/cf/find-func-no-libs2.m4)
|
||||
sinclude(heimdal/cf/resolv.m4)
|
||||
|
||||
smb_save_LIBS=$LIBS
|
||||
RESOLV_LIBS=""
|
||||
LIBS=""
|
||||
|
||||
dnl This fills in the global LIBS...
|
||||
rk_RESOLV
|
||||
|
||||
dnl AC_CHECK_LIB_EXT(resolv, RESOLV_LIBS, res_search)
|
||||
SMB_EXT_LIB_ENABLE(RESOLV,YES)
|
||||
|
||||
if test x"$LIBS" != "x"; then
|
||||
RESOLV_LIBS=$LIBS
|
||||
fi
|
||||
|
||||
LIBS=$smb_save_LIBS
|
||||
|
||||
SMB_EXT_LIB(RESOLV,[${RESOLV_LIBS}],[${RESOLV_CFLAGS}],[${RESOLV_CPPFLAGS}],[${RESOLV_LDFLAGS}])
|
||||
|
||||
|
||||
# these are disabled unless heimdal is found below
|
||||
SMB_SUBSYSTEM_ENABLE(KERBEROS_LIB, NO)
|
||||
SMB_BINARY_ENABLE(asn1_compile, NO)
|
||||
|
@ -460,7 +460,7 @@ heimdal_clean: hdb_asn1_clean spnego_asn1_clean krb5_asn1_clean
|
||||
NOPROTO = YES
|
||||
REQUIRED_SUBSYSTEMS = \
|
||||
HEIMDAL_GSSAPI HEIMDAL_KRB5 \
|
||||
HEIMDAL_ASN1 HEIMDAL_DES HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_VERS HEIMDAL_GLUE
|
||||
HEIMDAL_ASN1 HEIMDAL_DES HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_VERS HEIMDAL_GLUE EXT_LIB_RESOLV
|
||||
# End SUBSYSTEM HEIMDAL
|
||||
#######################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user