1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/source3/libads
Uri Simchoni c404793a38 libads: disable dns_lookup_realm in auto-generated krb5.conf files
This patch sets dns_lookup_realm=false in samba-generated krb5.conf.

Disabling dns_lookup_realm in krb5.conf is the recommended practice for
Kerberos usage in Active Directory environment. dns_lookup_realm is enabled
by default, at least in Heimdal.

When used by samba, Kerberos libraries operate based on either the system
krb5.conf, or a private krb5.conf generated specifically for the domain by
samba code. In the former case, it's the responsibility of the administrator
to set dns_lookup_realm=false. In the latter case, it's the responsibility
of samba - which is what this patch does.

In many usage scenarios the value of this variable is of no consequence
since samba knows the realm in which it is operating, and knows how to
generate service principal names. However, there are some scenarios
in which samba calls kerberos_get_principal_from_service_hostname(),
and here samba consults the Kerberos libraries and this parameter comes
into play. One primary example is cli_full_connection() function.

Not setting dns_lookup_realm leads to a series of DNS TXT record lookups.
This can be observed by running "net ads join -k -U <user>".

In AD environments, the TXT queries  typically fail quickly, but test setups
or misconfigured DNS may lead to large timeouts (for example, if the domain
is dept.example.com but there's no parent example.com domain and no DNS
zones for example.com). At the very least we want to avoid those lookups
because they are hardly documented and lead to confusion.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-07-17 01:38:15 +02:00
..
ads_ldap_protos.h Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
ads_proto.h Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
ads_status.c Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
ads_status.h Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
ads_struct.c s3-libads: Fix memory leaks in ads_build_path(). 2014-01-09 20:42:54 +01:00
authdata.c libads: Fix CID 1272956 Fixing wrong if condition 2015-04-18 01:33:04 +02:00
cldap.c s3:libads: make use of samba_tevent_context_init() 2013-02-19 23:47:46 +01:00
cldap.h Add cldap_multi_netlogon_send/recv 2011-10-17 09:52:29 +02:00
disp_sec.c Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
kerberos_keytab.c libads: Fix deadlock when re-joining a domain and updating keytab 2015-05-04 21:01:41 +02:00
kerberos_proto.h kerberos: Move DEFAULT_KRB5_PORT to a header file 2015-06-16 01:29:24 +02:00
kerberos_util.c Avoid overriding default ccache for ads operations. 2012-09-12 21:18:09 +02:00
kerberos.c libads: disable dns_lookup_realm in auto-generated krb5.conf files 2015-07-17 01:38:15 +02:00
krb5_errs.c kerberos: Map KRB5KDC_ERR_CLIENT_REVOKED to NT_STATUS_ACCOUNT_LOCKED_OUT 2014-04-02 17:12:46 +02:00
krb5_setpw.c s3-kpasswd: Fix build warning. 2014-09-01 18:15:15 +02:00
ldap_printer.c Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. 2015-04-22 06:22:29 +02:00
ldap_schema.c s3-talloc Change TALLOC_P() to talloc() 2011-06-09 12:40:08 +02:00
ldap_schema.h source3/libads/ldap_schema.h: fix licence/copyright 2011-06-10 15:12:22 +02:00
ldap_user.c s3: avoid global include of ads.h. 2010-08-05 00:32:02 +02:00
ldap_utils.c lib: Make sid_binstring_hex use TALLOC 2015-05-13 01:44:20 +02:00
ldap.c s3:libads: improve debug levels/messages in ads_find_dc() 2015-07-02 14:41:31 +02:00
ndr.c lib/param: Move all enum declarations to lib/param 2012-07-24 11:01:17 +02:00
sasl_wrapping.c Convert all uint32/16/8 to _t in a grab-bag of remaining files. 2015-05-14 22:16:56 +02:00
sasl.c s3:libads/sasl: use gensec_max_{input,wrapped}_size() in ads_sasl_spnego_ntlmssp_bind 2015-06-23 22:12:07 +02:00
sitename_cache.c Add a talloc context to sitename_fetch(). 2013-09-05 09:17:27 -07:00
sitename_cache.h Add a talloc context to sitename_fetch(). 2013-09-05 09:17:27 -07:00
util.c s3: use generate_random_password() instead of generate_random_str() 2013-02-04 17:14:22 +01:00