Simo Sorce
34a65739d3
Move source3/libads/dns.c to lib/addns
2012-05-23 17:51:48 +03:00
Simo Sorce
cc3321c9ff
s3-ads-dns: Avoid unnecessary dependencies
2012-05-23 17:51:48 +03:00
Simo Sorce
a7e94fce3f
s3-ads-dns: Break dependency on lp_parm
...
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Jeremy Allison
d673402992
Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.
...
Add a timeout_in_seconds parameter to nbt_getdc() to make it fail
after that time with NT_STATUS_IO_TIMEOUT.
2012-05-22 16:25:14 -07:00
Andrew Bartlett
5e26e94092
s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531
s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Günther Deschner
508e160776
s3: fix some -Wunused-but-set-variable build warnings.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May 30 17:41:18 CEST 2011 on sn-devel-104
2011-05-30 17:41:18 +02:00
Andrew Bartlett
818ec32d0c
s3-libads Pass a struct sockaddr_storage to cldap routines
...
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-28 05:30:20 +02:00
Volker Lendecke
b61c38fde6
s3: Fix some typos in dsgetdcname
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Apr 25 12:35:30 CEST 2011 on sn-devel-104
2011-04-25 12:35:30 +02:00
Volker Lendecke
60e8e33414
s3: "port" is not used in dsgetdcname
...
Günther, please check!
2011-04-25 11:47:27 +02:00
Volker Lendecke
fec0baacb6
s3: Make is_zero_addr take a sockaddr_storage
...
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-02-27 11:02:53 +01:00
Volker Lendecke
b4041b59b2
s3: Use the new nbt_getdc in dsgetdcname()
2011-01-07 13:28:06 +01:00
Volker Lendecke
9ccef4e62b
s3: Remove unused mem_ctx arg from set_getdc_request
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Jan 1 23:00:24 CET 2011 on sn-devel-104
2011-01-01 23:00:24 +01:00
Volker Lendecke
2036d64e59
s3: Remove a #define used just once
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Nov 20 15:28:26 CET 2010 on sn-devel-104
2010-11-20 15:28:26 +01:00
Jeremy Allison
52f2520648
Fix the unexpected.tdb database problem. Change nmbd to store the
...
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-11-14 05:22:45 +00:00
Günther Deschner
ffdfcfb514
s3-dsgetdcname: always pass in messaging context.
...
Volker, please check.
Guenther
2010-09-23 10:26:25 -07:00
Günther Deschner
56538be6af
s3-libads: move ads_dns out of main includes.
...
Guenther
2010-07-01 23:20:40 +02:00
Günther Deschner
fbb7814f91
s3: only use netlogon/nbt header when needed.
...
Guenther
2010-05-31 11:32:37 +02:00
Jelmer Vernooij
b8268cf7b0
s3: Remove use of iconv_convenience.
2010-05-18 11:45:31 +02:00
Günther Deschner
c6ebab846d
s3: only include gen_ndr headers where needed.
...
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-05-06 00:22:59 +02:00
Matthias Dieter Wallnöfer
eceffe6909
nbt: samlogon/netlogon structures - unify denominations
2010-04-27 18:45:41 +02:00
Volker Lendecke
0264c0c337
s3: Fix a memleak in discover_dc_netbios
2010-04-18 15:25:03 +02:00
Simo Sorce
61b7a24f16
s3 move the sitename cache in its own file
2010-02-23 12:46:26 -05:00
Volker Lendecke
752bffc53f
s3: Consolidate server_id_self into the equivalent procid_self()
2010-02-23 15:30:00 +01:00
Volker Lendecke
a0b9e40b2c
s3: Try to avoid dns searches with an empty site
2009-11-09 17:24:46 +01:00
Andrew Tridgell
4cb055cacd
ds-flags: use the new name DS_DNS_FOREST_ROOT
...
Update to use the new DS_DNS_FOREST_ROOT name, which makes it clearer
what this bit means (according to MS-ADTS doc)
2009-10-02 12:02:00 +10:00
Volker Lendecke
76d95b9a2d
s3:gencache: Add a "was_expired" argument to gencache_get_data_blob
...
This is set to true if the routine returns failure due to an existing but
expired entry.
2009-09-23 18:50:33 +02:00
Volker Lendecke
1df18922c6
Add some const to dsgetdcname
2009-08-25 17:38:31 +02:00
Volker Lendecke
4c69c151db
s3:dsgetdcname: Fix a crash in dsgetdcname
...
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-20 14:26:46 +02:00
Volker Lendecke
68ea287617
s3:dsgetdcname: Inline dsgetdcname_cache_refresh
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-08-20 14:26:46 +02:00
Jeremy Allison
2d0cd3e53a
(Hopefully) fix the problem Kai reported with
...
net ads leave and IPv6. Ensure all DC lookups
prefer IPv4.
Jeremy.
2009-07-28 18:02:10 -07:00
Volker Lendecke
3d7dfc1197
Consolidate string and data_blob routines in gencache
2009-07-15 10:55:20 +02:00
Volker Lendecke
3edcd55bf1
Remove gencache_init/shutdown
...
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-15 10:55:20 +02:00
Volker Lendecke
e5a34b2533
Remove gencache_[un]lock_key
2009-07-15 10:55:20 +02:00
Kumar Thangavelu
1a7898e3a8
s3/getdcname: Fix 'net' crash.
...
'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-05-29 11:27:38 +02:00
Volker Lendecke
251c220f91
Fix a type-punned warning
2009-04-28 11:58:44 +02:00
Björn Jacke
87b428e424
s3:dsgetdcname: use parentheses in if condition to make negation clear
...
Signed-off-by: Günther Deschner <gd@samba.org>
2009-03-24 10:20:12 +01:00
Stefan Metzmacher
1b7b0e924f
s3:dsgetdcname: retry with the clients site
...
metze
2008-12-13 11:47:13 +01:00
Günther Deschner
8d69a65110
s3-dsgetdcname: fix reply generation (forgot to map nt1 to nt5ex).
...
Guenther
2008-11-06 13:40:52 +01:00
Jelmer Vernooij
d6a5476ee7
Use sockaddr_storage only where we rely on the size, use sockaddr
...
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
2008-10-23 19:53:15 +02:00
Volker Lendecke
6ee4e81ad1
Fix an uninitialized variable warning
...
Not sure if we can ever not get domain and dns_domain, but gcc complained
2008-10-05 11:08:32 +02:00
Volker Lendecke
af1c802791
The IRIX compiler does not like embedded unnamed unions
2008-10-02 08:09:25 +02:00
Volker Lendecke
8641b54a73
Attempt to fix the build on IRIX
...
Under irix, "sa_family" is a #define to sa_union.sa_generic.sa_family2
2008-10-02 03:45:37 +02:00
Günther Deschner
da955d7193
s3-nbt: further cleanup of dsgetdcname().
...
Guenther
2008-09-25 20:11:55 +02:00
Günther Deschner
f07431f5ba
s3-nbt: use the new generated nbt.
...
Guenther
2008-09-24 03:34:23 +02:00
Günther Deschner
de54bac54c
s3: fix NETLOGON_NT_VERSION version flags.
...
Guenther
2008-09-23 23:20:10 +02:00
Günther Deschner
c48186f507
s3: use samba4 prototype for ndr_push/pull_struct_blob.
...
Guenther
2008-09-23 09:37:23 +02:00
Volker Lendecke
d670d0a09b
Revert "Remove gencache_[un]lock_entry"
...
This reverts commit 7a5a575ffe
.
(This used to be commit 62e444dd50
)
2008-07-11 17:53:25 +02:00
Volker Lendecke
352b5c1857
Remove gencache_[un]lock_entry
...
Günther agreed that it might be unnecessary in dsgetdcname_cache_store() :-)
(This used to be commit 7a5a575ffe
)
2008-07-03 16:40:46 +02:00
Günther Deschner
513bc4e791
dsgetdcname: allow to use NULL mem_ctx.
...
Guenther
(This used to be commit d20353d30c
)
2008-06-17 19:51:24 +02:00