summaryrefslogtreecommitdiff
path: root/source3/libsmb/dsgetdcname.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-05Add a talloc context to sitename_fetch().Jeremy Allison1-2/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-05lib: Add "mem_ctx" to gencache_get_data_blobVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-04Optimization. Don't do the retry logic if sitename_fetch() returned NULL, we ↵Jeremy Allison1-1/+5
already did a NULL query. Bug 5917 - Samba does not work on site with Read Only Domain Controller Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 4 01:19:05 CEST 2013 on sn-devel-104
2013-09-04Move the retry logic when site_name is passed in a NULL or "" to the wrapper ↵Jeremy Allison1-4/+21
function. Bug 5917 - Samba does not work on site with Read Only Domain Controller Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org>
2013-09-04Move the manipulation of site_name into the caller function dsgetdcname().Jeremy Allison1-15/+19
Leave dsgetdcname_internal() only using const char *site_name. Bug 5917 - Samba does not work on site with Read Only Domain Controller Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org>
2013-09-04Refactor dsgetdcname to be called via a wrapper function.Jeremy Allison1-5/+26
Bug 5917 - Samba does not work on site with Read Only Domain Controller Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org>
2013-09-04dsgetdcname_cache_fetch() doesn't use the site_name parameter so don't pass it.Jeremy Allison1-2/+1
Bug 5917 - Samba does not work on site with Read Only Domain Controller Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org>
2012-07-19s3-param: Make lp_name_resolve_order() return a listAndrew Bartlett1-1/+2
This allows this parameter, one of the few with differing declarations between the loadparm systems, to be brought into common. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-05-23Move source3/libads/dns.c to lib/addnsSimo Sorce1-1/+1
2012-05-23s3-ads-dns: Avoid unnecessary dependenciesSimo Sorce1-1/+8
2012-05-23s3-ads-dns: Break dependency on lp_parmSimo Sorce1-8/+15
In preparation of making this code common to s3 and s4
2012-05-22Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.Jeremy Allison1-1/+1
Add a timeout_in_seconds parameter to nbt_getdc() to make it fail after that time with NT_STATUS_IO_TIMEOUT.
2011-06-09s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-3/+3
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-05-30s3: fix some -Wunused-but-set-variable build warnings.Günther Deschner1-2/+0
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Mon May 30 17:41:18 CEST 2011 on sn-devel-104
2011-04-28s3-libads Pass a struct sockaddr_storage to cldap routinesAndrew Bartlett1-1/+2
This avoids these routines doing a DNS lookup that has already been done, and ensures that the emulated DNS lookup isn't thrown away. Andrew Bartlett
2011-04-25s3: Fix some typos in dsgetdcnameVolker Lendecke1-3/+3
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Apr 25 12:35:30 CEST 2011 on sn-devel-104
2011-04-25s3: "port" is not used in dsgetdcnameVolker Lendecke1-3/+0
Günther, please check!
2011-02-27s3: Make is_zero_addr take a sockaddr_storageVolker Lendecke1-1/+1
All callers had to cast this anyway Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Feb 27 11:02:53 CET 2011 on sn-devel-104
2011-01-07s3: Use the new nbt_getdc in dsgetdcname()Volker Lendecke1-20/+7
2011-01-01s3: Remove unused mem_ctx arg from set_getdc_requestVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Jan 1 23:00:24 CET 2011 on sn-devel-104
2010-11-20s3: Remove a #define used just onceVolker Lendecke1-2/+2
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Nov 20 15:28:26 CET 2010 on sn-devel-104
2010-11-14Fix the unexpected.tdb database problem. Change nmbd to store theJeremy Allison1-1/+7
transaction id of packets it was requested to send via a client, and only store replies that match these ids. On the client side change clients to always attempt to ask nmbd first for name_query and node_status calls, and then fall back to doing socket calls if we can't talk to nmbd (either nmbd is not running, or we're not root and cannot open the messaging tdb's). Fix readers of unexpected.tdb to delete packets they've successfully read. This should fix a long standing problem of unexpected.tdb growing out of control in noisy NetBIOS envioronments with lots of bradcasts, yet still allow unprivileged client apps to work mostly as well as they already did (nmblookup for example) in an environment when nmbd isn't running. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sun Nov 14 05:22:45 UTC 2010 on sn-devel-104
2010-09-23s3-dsgetdcname: always pass in messaging context.Günther Deschner1-26/+2
Volker, please check. Guenther
2010-07-01s3-libads: move ads_dns out of main includes.Günther Deschner1-0/+1
Guenther
2010-05-31s3: only use netlogon/nbt header when needed.Günther Deschner1-0/+2
Guenther
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-2/+2
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+1
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
2010-04-27nbt: samlogon/netlogon structures - unify denominationsMatthias Dieter Wallnöfer1-7/+7
2010-04-18s3: Fix a memleak in discover_dc_netbiosVolker Lendecke1-0/+3
2010-02-23s3 move the sitename cache in its own fileSimo Sorce1-0/+1
2010-02-23s3: Consolidate server_id_self into the equivalent procid_self()Volker Lendecke1-1/+1
2009-11-09s3: Try to avoid dns searches with an empty siteVolker Lendecke1-1/+1
2009-10-02ds-flags: use the new name DS_DNS_FOREST_ROOTAndrew Tridgell1-1/+1
Update to use the new DS_DNS_FOREST_ROOT name, which makes it clearer what this bit means (according to MS-ADTS doc)
2009-09-23s3:gencache: Add a "was_expired" argument to gencache_get_data_blobVolker Lendecke1-1/+1
This is set to true if the routine returns failure due to an existing but expired entry.
2009-08-25Add some const to dsgetdcnameVolker Lendecke1-5/+5
2009-08-20s3:dsgetdcname: Fix a crash in dsgetdcnameVolker Lendecke1-0/+2
When returning NT_STATUS_OK we can't leave *info == NULL, this crashes in is_closest_site called from dsgetdcname(). Signed-off-by: Günther Deschner <gd@samba.org>
2009-08-20s3:dsgetdcname: Inline dsgetdcname_cache_refreshVolker Lendecke1-26/+7
Signed-off-by: Günther Deschner <gd@samba.org>
2009-07-28(Hopefully) fix the problem Kai reported withJeremy Allison1-2/+3
net ads leave and IPv6. Ensure all DC lookups prefer IPv4. Jeremy.
2009-07-15Consolidate string and data_blob routines in gencacheVolker Lendecke1-8/+7
2009-07-15Remove gencache_init/shutdownVolker Lendecke1-12/+0
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15Remove gencache_[un]lock_keyVolker Lendecke1-6/+0
2009-05-29s3/getdcname: Fix 'net' crash.Kumar Thangavelu1-2/+2
'net' command crashed when attempting to join a domain. This occurred in a very specific case where the DC had multiple IPs and one of the IPs was invalid. Signed-off-by: Volker Lendecke <vl@samba.org>
2009-04-28Fix a type-punned warningVolker Lendecke1-1/+1
2009-03-24s3:dsgetdcname: use parentheses in if condition to make negation clearBjörn Jacke1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2008-12-13s3:dsgetdcname: retry with the clients siteStefan Metzmacher1-6/+43
metze
2008-11-06s3-dsgetdcname: fix reply generation (forgot to map nt1 to nt5ex).Günther Deschner1-0/+2
Guenther
2008-10-23Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij1-1/+1
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
2008-10-05Fix an uninitialized variable warningVolker Lendecke1-0/+2
Not sure if we can ever not get domain and dns_domain, but gcc complained
2008-10-02The IRIX compiler does not like embedded unnamed unionsVolker Lendecke1-10/+10