summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_lookup.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a talloc context to sitename_fetch().Jeremy Allison2013-09-051-12/+5
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:utils/net_lookup fix a format-errorChristian Ambach2013-06-211-1/+1
| | | | | | | clang complains about short being used for unsigned as format-error Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Move source3/libads/dns.c to lib/addnsSimo Sorce2012-05-231-1/+1
|
* s3-ads-dns: Break dependency on lp_parmSimo Sorce2012-05-231-2/+6
| | | | In preparation of making this code common to s3 and s4
* s3-net: Don't use an internal krb5 for kdc lookup.Andreas Schneider2012-02-091-19/+23
| | | | | | | This replaces the use of the internal krb5_locate_kdc() function with our own get_kdc_list() function. Signed-off-by: Günther Deschner <gd@samba.org>
* Fix const warning.Jeremy Allison2011-06-011-1/+1
|
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-181-1/+1
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* More const fixes... getting near the end now.Jeremy Allison2011-05-061-1/+1
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 6 00:57:00 CEST 2011 on sn-devel-104
* s3-passdb: use passdb headers where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Fix bug 7866 - "net" in v3-6-test broken.Jeremy Allison2010-12-151-0/+6
| | | | | | | Someone wasn't careful about testing when not running as root :-). Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 15 20:45:25 CET 2010 on sn-devel-104
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3-dsgetdcname: always pass in messaging context.Günther Deschner2010-09-231-1/+1
| | | | | | Volker, please check. Guenther
* s3-libnet: better separate headers.Günther Deschner2010-07-131-0/+1
| | | | Guenther
* s3-libads: move ads_dns out of main includes.Günther Deschner2010-07-011-0/+1
| | | | Guenther
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-211-2/+2
| | | | | | | | | | This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-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
* s3 move the sitename cache in its own fileSimo Sorce2010-02-231-0/+1
|
* s3 net: Fix compile warningsKai Blin2010-01-191-6/+13
|
* s3/net: split up some printable stings to ease i18nBjörn Jacke2010-01-181-4/+4
| | | | | | If we put strings like "Usage:" into separate _() macros and not the whole "Usage:..." string we can cover much more messages by only one single translation. The drawback is that the message in the sources looks less pretty.
* s3 net: i18n support for net lookupKai Blin2009-07-301-12/+12
|
* Added prefer_ipv4 bool parameter to resolve_name().Jeremy Allison2009-07-281-2/+2
| | | | | | | | | | W2K3 DC's can have IPv6 addresses but won't serve krb5/ldap or cldap on those addresses. Make sure when we're asking for DC's we prefer IPv4. If you have an IPv6-only network this prioritizing code will be a no-op. And if you have a mixed network then you need to prioritize IPv4 due to W2K3 DC's. Jeremy.
* Fix all warnings in source3 with gcc4.3.Jeremy Allison2008-12-311-2/+6
| | | | Jeremy.
* net: Fix net lookup dsgetdcname, no need to pull site ourselves.Günther Deschner2008-05-151-12/+2
| | | | | Guenther (This used to be commit 954d0998c2c00140addb6ba3845e80ed91e4effc)
* net: more whitespace cleanupKai Blin2008-05-101-3/+3
| | | | (This used to be commit ef0184d580500734fc7af51e1c790b075180a3d0)
* net: Remove globalsKai Blin2008-05-101-19/+19
| | | | (This used to be commit 1e9319cf88b65a2a8d4f5099a1fe5297e405ed2e)
* dsgetdcname: use existing messaging_context if possible.Günther Deschner2008-05-091-1/+1
| | | | | Guenther (This used to be commit 7889516a384c155a9045aad4409c041fddd0d98d)
* Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.Günther Deschner2008-02-281-2/+5
| | | | | Guenther (This used to be commit b1a4b21f8c35dc23e5c986ebe44d3806055eb39b)
* Eliminate remote tree of dsgetdcname (which will happen in libnetapi then).Günther Deschner2008-01-291-1/+1
| | | | | Guenther (This used to be commit fd490d236b1fb73a75c457b75128c9b98719418f)
* As long as DsGetDcName is not part of libnetapi, lowercase the fn name.Günther Deschner2008-01-111-1/+1
| | | | | Guenther (This used to be commit 19a980f52044a170618629e5b0484c1f6b586e5f)
* Replace sid_string_static with sid_string_tosVolker Lendecke2007-12-151-2/+2
| | | | | In utils/ I was a bit lazy... (This used to be commit 60e830b0f4571bd5d9039f2edd199534f2a4c341)
* Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison2007-11-151-1/+1
| | | | | Jeremy. (This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
* Fix Solaris by ensuring we use the IPv4 or IPv6 lengthJeremy Allison2007-11-021-1/+1
| | | | | | in any getnameinfo calls. Jeremy (This used to be commit 4d7badb0c44f287034f58d9a412e662c0fbecdc9)
* This is a large patch (sorry). Migrate from struct in_addrJeremy Allison2007-10-241-35/+58
| | | | | | | | | | | | | | 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)
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-1/+1
| | | | | | | | 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)
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker (This used to be commit 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
* r24742: Add experimental DsGetDcName() call (will be used by krb5 locator ↵Günther Deschner2007-10-101-5/+100
| | | | | | | | | for fine grained KDC DNS queries). Guenther (This used to be commit 3263cd680fe429430d789b284464fca72ef45719)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r22003: Fix from Jiri.Sasek@Sun.COM to wrap our krb5_locate_kdcJeremy Allison2007-10-101-2/+2
| | | | | | | call as smb_krb5_locate_kdc to prevent incorrect linking and crashes on Solaris. Jeremy. (This used to be commit 7d30737c8d851505e81a60443baf9a8c7e523472)
* r20874: We need to distinguish client sitenames per realm. We were overwritingGünther Deschner2007-10-101-2/+4
| | | | | | | | the stored client sitename with the sitename from each sucessfull CLDAP connection. Guenther (This used to be commit 6a13e878b5d299cb3b3d7cb33ee0d51089d9228d)
* r20857: Silence gives assent :-). Checking in the fix forJeremy Allison2007-10-101-6/+15
| | | | | | | | | | 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)
* r19416: Fix some c++ warnings.Günther Deschner2007-10-101-2/+2
| | | | | Guenther (This used to be commit b076c39b6ac87a078feae30a4384c881c46e81ac)
* r18271: Big change:Gerald Carter2007-10-101-2/+2
| | | | | | | | | | | | * autogenerate lsa ndr code * rename 'enum SID_NAME_USE' to 'enum lsa_SidType' * merge a log more security descriptor functions from gen_ndr/ndr_security.c in SAMBA_4_0 The most embarassing thing is the "#define strlen_m strlen" We need a real implementation in SAMBA_3_0 which I'll work on after this code is in. (This used to be commit 3da9f80c28b1e75ef6d46d38fbb81ade6b9fa951)
* r18047: More C++ stuffVolker Lendecke2007-10-101-3/+3
| | | | (This used to be commit 86f4ca84f2df2aa8977eb24828e3aa840dda7201)
* r17881: Another microstep towards better error reporting: Make ↵Volker Lendecke2007-10-101-1/+1
| | | | | | | | | | | | | | | | | get_sorted_dc_list return NTSTATUS. If we want to differentiate different name resolution problems we might want to introduce yet another error class for Samba-internal errors. Things like no route to host to the WINS server, a DNS server explicitly said host not found etc might be worth passing up. Because we can not stash everything into the existing NT_STATUS codes, what about a Samba-specific error class like NT_STATUS_DOS and NT_STATUS_LDAP? Volker (This used to be commit 60a166f0347170dff38554bed46193ce1226c8c1)
* r15462: replace the use of OpenLDAP's ldap_domain2hostlist() forGerald Carter2007-10-101-29/+43
| | | | | | locating AD DC's with out own DNS SRV queries. Testing on Linux and Solaris. (This used to be commit cf71f88a3cdcabf99c0798ef4cf8c978397a57eb)
* r13316: Let the carnage begin....Gerald Carter2007-10-101-0/+52
| | | | | Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
* r12045: More warning fixes... Just a few more to go.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit cd192ed79a531c6775cdbfb35f0eb2e0fa230ce9)
* r11864: fix build breakage with solaris LDAP patch (my fault)Gerald Carter2007-10-101-2/+2
| | | | (This used to be commit 7ac6afe4dcded2e3db9e2012aaa57879bb63b508)
* r11551: Add a few more initialize_krb5_error_tableVolker Lendecke2007-10-101-0/+1
| | | | (This used to be commit d92c83aa42fe64a0e996094d1a983f0279c7c707)