summaryrefslogtreecommitdiff
path: root/source3/libsmb/namequery.c
AgeCommit message (Collapse)AuthorFilesLines
2008-12-13s3:libsmb/namequery.c: add saf_join_store() functionStefan Metzmacher1-3/+65
saf_join_store() should be called after a successful domain join, the affinity to the dc used at join time has a larger ttl, to avoid problems with delayed replication. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 80e74a27c55c01221091e3eec930c2ac4433c22c)
2008-12-13s3: libsmb/namequery: fallback to returning all dcs, when none is available ↵Stefan Metzmacher1-0/+9
in the requested site It could happen that all dcs in a site are unavailable (some sites have only one dc) and then we need to fallback to get all dcs. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit c127367b1dd622eeceb1f47de0a047c297dda222)
2008-12-03s3: Change sockaddr util function names for consistencyTim Prouty1-5/+5
Also eliminates name conflicts with OneFS system libraries
2008-10-23Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij1-18/+18
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
2008-07-11Revert "Pass NULL to gencache_get when we are not interested in the timeout ↵Volker Lendecke1-1/+2
value" This reverts commit 16062dfc3dcc8f1ca0024a3ae21effb889c7ffc0. (This used to be commit 114ca8577568cdb5a81d8734f1d1d096f1b36c36)
2008-07-03Pass NULL to gencache_get when we are not interested in the timeout valueVolker Lendecke1-2/+1
(This used to be commit 16062dfc3dcc8f1ca0024a3ae21effb889c7ffc0)
2008-06-05More correct fix (hopefully :-) for any memory leaks.Jeremy Allison1-1/+17
Jerry promised to check :-). Vl also please review. Jeremy. (This used to be commit 8abc6e742147486a62b4a3f9845e34062845d8ea)
2008-04-22build: fix the build.Günther Deschner1-2/+2
Guenther (This used to be commit 09a0001063d5bdd9bdc7abfbf1467beb062de049)
2008-04-14Make use of ZERO_STRUCT instead of memset in namequery.cVolker Lendecke1-1/+1
(This used to be commit 4f1d49615e1407b9c3ad5eeb50a248b8fee50e23)
2008-03-15Fix Coverity ID 555Volker Lendecke1-0/+1
(This used to be commit 44122f06d02492a7a0a37413d6f975c3b1e3c283)
2008-01-16Make resolve_ads() static.Günther Deschner1-5/+5
Guenther (This used to be commit 57dc747136e880a25c03bdc4a1431fc41afd93a1)
2008-01-12Fix CID 470. resolve_order can't be NULL here so simplify code.Jeremy Allison1-10/+3
Jeremy. (This used to be commit 2e75f3ecdf9890b9d7d4bd03f3fa15ef74816d5d)
2007-12-12Allow cliconnect to loop through multiple ip addressesJeremy Allison1-0/+81
for a server. We should have been doing this for a while, but it's more critical with IPv6. Original patch fixed up by James. Jeremy. (This used to be commit 5c7f7629a97ef0929e00e52f1fae4386c984000b)
2007-12-10Ensure we have a non-null flags. Pointed out by Andreas Schneider ↵Jeremy Allison1-0/+7
<anschneider@suse.de>. Jeremy. (This used to be commit cafde6c37259de587d3775a2d229abd253d2376d)
2007-12-10Fix errors from next_token conversion. Spotted byJeremy Allison1-9/+5
Andreas Schneider <anschneider@suse.de>. Jeremy. (This used to be commit b40efc2fe63a3420b62fbf1ea8936112c5a24bdc)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison1-1/+1
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-12-09Specifically ask for IP4 addresses if we don't have IP6 support.James Peach1-0/+5
(This used to be commit 4786654992e3cb2280b77406f9217fcec981602c)
2007-12-07Remove next_token - all uses must now be next_token_talloc.Jeremy Allison1-13/+17
No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-05Remove some globalsVolker Lendecke1-1/+1
(This used to be commit 31d0a846db08d845e6cdfd85def4ac1c34031e02)
2007-11-27Remove pstrings from namequery.c.Jeremy Allison1-24/+47
Jeremy. (This used to be commit 71ccd0c42e0ae66172ca5797be3d3a01f4a67a69)
2007-11-19Remove pstring from nmbd.Jeremy Allison1-12/+34
Jeremy. (This used to be commit a317f70c229f7730279eaa323f7ebfd499257f76)
2007-10-29Change our DNS code to cope with AAAA records. A6 recordsJeremy Allison1-6/+3
look like a nightmare to use, so ignore them for now. Jeremy. (This used to be commit 814daded90781dc5a5bdd522ea8cfe5d47e6d7a7)
2007-10-27Change all occurrences of zero_addr(&ss,AF_INET) toJeremy Allison1-4/+4
zero_addr(&ss). All current uses were always of the AF_INET form, so simplify the call. If in the future we need to zero an addr to AF_INET6 this can be done separately. Jeremy. (This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c)
2007-10-26Move the horrible hack for link local addresses out of namequery.cJeremy Allison1-26/+0
and into util_sock.c. is_ipaddress() now copes with link:local:v6%ifname addresses, as does interpret_string_addr(). Jeremy (This used to be commit a3f7db3d30ced566c8340696914f1be3293a9c5b)
2007-10-25Fix resolve name to resolve IPv6 addresses of link-local%ifaddrJeremy Allison1-0/+26
Jeremy. (This used to be commit e6609cab732d5cd5cc9a5ae50aee15147f2ec6ec)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-448/+678
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-19Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.Gerald (Jerry) Carter1-1/+2
(This used to be commit fd28d09a95b31bdbc6babd13c5a4ed9fc9ef4bfd)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-26/+26
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-15Move to protocol independent code in most of lib/util_sock.cJeremy Allison1-10/+50
We don't use gethostbyname any more except in one case where we're looking for host aliases (I don't know how to do that with getaddrinfo yet). New function should be getaddrinfo(). Next step will be fixing lib/access.c, and then changing libsmb/namequery.c to cope with IPv6 address returns. Jeremy. (This used to be commit 4a56b697b6adcf095e25895c4a9ba3192ed34124)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-11/+24
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10r25407: Revert Longhorn join patch as it is not correct for the 3.2 tree.Gerald Carter1-29/+0
The translate_name() used by cli_session_setup_spnego() cann rely Winbindd since it is needed by the join process (and hence before Winbind can be run). (This used to be commit 00a93ed336c5f36643e6e33bd277608eaf05677c)
2007-10-10r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,Gerald Carter1-0/+29
and client fixes. Patch from Todd Stetcher <todd.stetcher@isilon.com>. (This used to be commit 8304ccba7346597425307e260e88647e49081f68)
2007-10-10r24739: With resolve_ads() allow to query for PDCs as well.Günther Deschner1-6/+20
Also add dns query functions to find GCs and DCs by GUID. Guenther (This used to be commit cc469157f6684ec507bf1c3a659fc36a53d304a1)
2007-10-10r24737: Remove older TODO: Convert internal_resolve_name() and friends to ↵Günther Deschner1-96/+134
NTSTATUS. Guenther (This used to be commit 8300aac4944613e411a78ab98de5d77f8fd38fa7)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23710: Remove some code duplication, we do have a random number generatorVolker Lendecke1-7/+3
(This used to be commit afd7febd980bb000f81d5251d03d500cb43c39f4)
2007-10-10r22417: Refactor the various daemon run-mode options to make the semanticsJames Peach1-1/+1
of the various flags explicit. (This used to be commit 19c929c6330a50f278ac322ac5fcb83d03734ea2)
2007-10-10r20874: We need to distinguish client sitenames per realm. We were overwritingGünther Deschner1-1/+1
the stored client sitename with the sitename from each sucessfull CLDAP connection. Guenther (This used to be commit 6a13e878b5d299cb3b3d7cb33ee0d51089d9228d)
2007-10-10r20861: We only use sitespecific DNS lookups when looking for DCs or KDCs, notGünther Deschner1-5/+1
for a PDC. Guenther (This used to be commit 0944c7861004bee2a9d0ac787f022f5bf1d181ac)
2007-10-10r20857: Silence gives assent :-). Checking in the fix forJeremy Allison1-22/+36
site support in a network where many DC's are down. I heard via Volker there is still a bug w.r.t the wrong site being chosen with trusted domains but we'll have to layer that fix on top of this. Gd - complain if this doesn't work for you. Jeremy. (This used to be commit 97e248f89ac6548274f03f2ae7583a255da5ddb3)
2007-10-10r20604: Fix two memleaks, Coverity ID 337, merge to 3_0_24Volker Lendecke1-0/+2
(This used to be commit 44f9d25a9026df29fcaae8723ef52b1d3101628b)
2007-10-10r20603: Slightly simplify logicVolker Lendecke1-7/+7
(This used to be commit e4dea0e64747912da899e846b944c24804772259)
2007-10-10r19754: * When using a krb5 session setup, we don't fill in the server_nameGerald Carter1-8/+7
string the clis_state struct. So call saf_store() after we have the short domain name in the lsa_query_inof_policy code. * Remove unused server string in saf_delete() (This used to be commit 3eddae2f2080f8dafec883cb9ffa2e578c242607)
2007-10-10r19652: Trying to track down which caller tries to store a 0 length domain nameGünther Deschner1-1/+6
in the affinity cache (which happens all the time here). Guenther (This used to be commit 45d6d300767d5b99aff332bdfb0a8f464fd103e0)
2007-10-10r19243: Fix debug statement.Günther Deschner1-1/+1
Guenther (This used to be commit 4b9d79147ae81fb701abf02dc046076f606443b6)
2007-10-10r18199: Allow winbindd to delete a saf_ entry if it knowsJeremy Allison1-0/+24
it can't talk to it. Jeremy. (This used to be commit 7385a076f8fd351472d37d9363304948e88f9f99)
2007-10-10r18007: Ensure we don't namecache KDC entries with port 88Jeremy Allison1-0/+2
as a generic DC (that should be the LDAP port). Jeremy. (This used to be commit f16b41c3c92b1af5cf25d8d244b1f551573cb076)
2007-10-10r18006: Actually a smaller change than it looks. LeverageJeremy Allison1-7/+58
the get_dc_list code to get the _kerberos. names for site support. This way we don't depend on one KDC to do ticket refresh. Even though we know it's up when we add it, it may go down when we're trying to refresh. Jeremy. (This used to be commit 77fe2a3d7418012a8dbfb6aaeb2a8dd57c6e1a5d)
2007-10-10r17928: Implement the basic store for CLDAP sitenameJeremy Allison1-3/+3
support when looking up DC's. On every CLDAP call store the returned client sitename (if present, delete store if not) in gencache with infinate timeout. On AD DNS DC lookup, try looking for sitename DC's first, only try generic if sitename DNS lookup failed. I still haven't figured out yet how to ensure we fetch the sitename with a CLDAP query before doing the generic DC list lookup. This code is difficult to understand. I'll do some experiments and backtraces tomorrow to try and work out where to force a CLDAP site query first. Jeremy. (This used to be commit ab3f0c5b1e9c5fd192c5514cbe9451b938f9cd5d)