summaryrefslogtreecommitdiff
path: root/source3/utils/net_lookup.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-23s3 move the sitename cache in its own fileSimo Sorce1-0/+1
2010-01-19s3 net: Fix compile warningsKai Blin1-6/+13
2010-01-18s3/net: split up some printable stings to ease i18nBjörn Jacke1-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.
2009-07-30s3 net: i18n support for net lookupKai Blin1-12/+12
2009-07-28Added prefer_ipv4 bool parameter to resolve_name().Jeremy Allison1-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.
2008-12-31Fix all warnings in source3 with gcc4.3.Jeremy Allison1-2/+6
Jeremy.
2008-05-15net: Fix net lookup dsgetdcname, no need to pull site ourselves.Günther Deschner1-12/+2
Guenther (This used to be commit 954d0998c2c00140addb6ba3845e80ed91e4effc)
2008-05-10net: more whitespace cleanupKai Blin1-3/+3
(This used to be commit ef0184d580500734fc7af51e1c790b075180a3d0)
2008-05-10net: Remove globalsKai Blin1-19/+19
(This used to be commit 1e9319cf88b65a2a8d4f5099a1fe5297e405ed2e)
2008-05-09dsgetdcname: use existing messaging_context if possible.Günther Deschner1-1/+1
Guenther (This used to be commit 7889516a384c155a9045aad4409c041fddd0d98d)
2008-02-28Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.Günther Deschner1-2/+5
Guenther (This used to be commit b1a4b21f8c35dc23e5c986ebe44d3806055eb39b)
2008-01-29Eliminate remote tree of dsgetdcname (which will happen in libnetapi then).Günther Deschner1-1/+1
Guenther (This used to be commit fd490d236b1fb73a75c457b75128c9b98719418f)
2008-01-11As long as DsGetDcName is not part of libnetapi, lowercase the fn name.Günther Deschner1-1/+1
Guenther (This used to be commit 19a980f52044a170618629e5b0484c1f6b586e5f)
2007-12-15Replace sid_string_static with sid_string_tosVolker Lendecke1-2/+2
In utils/ I was a bit lazy... (This used to be commit 60e830b0f4571bd5d9039f2edd199534f2a4c341)
2007-11-15Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison1-1/+1
Jeremy. (This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
2007-11-02Fix Solaris by ensuring we use the IPv4 or IPv6 lengthJeremy Allison1-1/+1
in any getnameinfo calls. Jeremy (This used to be commit 4d7badb0c44f287034f58d9a412e662c0fbecdc9)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-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)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-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)
2007-10-10r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke1-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)
2007-10-10r24742: Add experimental DsGetDcName() call (will be used by krb5 locator ↵Günther Deschner1-5/+100
for fine grained KDC DNS queries). Guenther (This used to be commit 3263cd680fe429430d789b284464fca72ef45719)
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-10r22003: Fix from Jiri.Sasek@Sun.COM to wrap our krb5_locate_kdcJeremy Allison1-2/+2
call as smb_krb5_locate_kdc to prevent incorrect linking and crashes on Solaris. Jeremy. (This used to be commit 7d30737c8d851505e81a60443baf9a8c7e523472)
2007-10-10r20874: We need to distinguish client sitenames per realm. We were overwritingGünther Deschner1-2/+4
the stored client sitename with the sitename from each sucessfull CLDAP connection. Guenther (This used to be commit 6a13e878b5d299cb3b3d7cb33ee0d51089d9228d)
2007-10-10r20857: Silence gives assent :-). Checking in the fix forJeremy Allison1-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)
2007-10-10r19416: Fix some c++ warnings.Günther Deschner1-2/+2
Guenther (This used to be commit b076c39b6ac87a078feae30a4384c881c46e81ac)
2007-10-10r18271: Big change:Gerald Carter1-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)
2007-10-10r18047: More C++ stuffVolker Lendecke1-3/+3
(This used to be commit 86f4ca84f2df2aa8977eb24828e3aa840dda7201)
2007-10-10r17881: Another microstep towards better error reporting: Make ↵Volker Lendecke1-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)
2007-10-10r15462: replace the use of OpenLDAP's ldap_domain2hostlist() forGerald Carter1-29/+43
locating AD DC's with out own DNS SRV queries. Testing on Linux and Solaris. (This used to be commit cf71f88a3cdcabf99c0798ef4cf8c978397a57eb)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-0/+52
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r12045: More warning fixes... Just a few more to go.Jeremy Allison1-1/+1
Jeremy. (This used to be commit cd192ed79a531c6775cdbfb35f0eb2e0fa230ce9)
2007-10-10r11864: fix build breakage with solaris LDAP patch (my fault)Gerald Carter1-2/+2
(This used to be commit 7ac6afe4dcded2e3db9e2012aaa57879bb63b508)
2007-10-10r11551: Add a few more initialize_krb5_error_tableVolker Lendecke1-0/+1
(This used to be commit d92c83aa42fe64a0e996094d1a983f0279c7c707)
2007-10-10r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab.Jeremy Allison1-1/+2
Jeremy. (This used to be commit af8545806770a7530eecc184bdd230ca14999884)
2007-10-10r6149: Fixes bugs #2498 and 2484.Derrell Lipman1-1/+1
1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
2007-10-10r6127: Eliminated all compiler warnings pertaining to mismatched ↵Derrell Lipman1-1/+1
"qualifiers". The whole of samba comiles warning-free with the default compiler flags. Temporarily defined -Wall to locate other potential problems. Found an unused static function (#ifdefed out rather than deleted, in case it's needed for something in progress). There are also a number of uses of undeclared functions, mostly krb5_*. Files with these problems need to have appropriate header files included, but they are not fixed in this update. oplock_linux.c.c has undefined functions capget() and capset(), which need to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>, but that could potentially have other side effects, so that remains uncorrected as well. The flag -Wall should be added permanently to CFLAGS, and all warnings then generated should be eliminated. (This used to be commit 5b19ede88ed80318e392f8017f4573fbb2ecbe0f)
2007-10-10r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid ofTim Potter1-1/+1
'..' from all #include preprocessor commands. This fixes bugzilla #1880 where OpenVMS gets confused about the '.' characters. (This used to be commit 7f161702fa4916979602cc0295919b541912acd6)
2003-09-05Fix for bug #73. Name types can be specified using name#type notation.Tim Potter1-7/+31
Also added shortcut so that 'net lookup foo#1b' works. (This used to be commit f38679201e301d66473e74506f07812590d19fa4)
2003-06-25large change:Gerald Carter1-4/+4
*) consolidates the dc location routines again (dns and netbios) get_dc_list() or get_sorted_dc_list() is the authoritative means of locating DC's again. (also inludes a flag to get_dc_list() to define if this should be a DNS only lookup or not) (however, if you set "name resolve order = hosts wins" you could still get DNS queries for domain name IFF ldap_domain2hostlist() fails. The answer? Fix your DNS setup) *) enabled DOMAIN<0x1c> lookups to be funneled through resolve_hosts resulting in a call to ldap_domain2hostlist() if lp_security() == SEC_ADS *) enables name cache for winbind ADS backend *) enable the negative connection cache for winbind ADS backend *) removes some old dead code *) consolidates some duplicate code *) moves the internal_name_resolve() to use an IP/port pair to deal with SRV RR dns replies. The namecache code also supports the IP:port syntax now as well. *) removes 'ads server' and moves the functionality back into 'password server' (which can support "hostname:port" syntax now but works fine with defaults depending on the value of lp_security()) (This used to be commit d7f7fcda425bef380441509734eca33da943c091)
2003-01-30Sync of Heimdal kerberos stuff with HEAD. If this breaks I'm blamingTim Potter1-1/+1
the dog again. (This used to be commit 6f89ee2c9dc7f03e3dbe7aa734bf67c6a434d135)
2003-01-28Finally we compile with Heimdal as well as MIT ! Wonder if it works... :-).Jeremy Allison1-1/+1
Jeremy. (This used to be commit 1b71786c161cd8ec4c3c0c6b178370ed50feeef4)
2002-11-23[merge from APP_HEAD]Gerald Carter1-1/+2
90% fix for CR 1076. The password server parameter will no take things like password server = DC1 * which means to contact DC1 first and the go to auto lookup if it fails. jerry (This used to be commit 016ef8b36b30846311a5321803298f8e28719244)
2002-11-06Merge of get_dc_list() api change from HEAD.Tim Potter1-8/+8
(This used to be commit 6ba7847ce2756fde94e530fd0bf2a055f3e27373)
2002-08-17sync 3.0 branch with HEADJelmer Vernooij1-3/+6
(This used to be commit 1b83b78e332b9d28914eff155530e81cf2073a58)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-2/+171
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-15Some help cleanups. Formatting and consistency issues. Line up text ↵Jim McDonough1-1/+1
nicely, and make 'net help rap user' the same as 'net rap user help'...stuff like that (This used to be commit 17775dae28c724b11cc73f2aeac5f07f9656046c)
2002-01-30Removed version number from file header.Tim Potter1-1/+0
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-12-20added net lookup commandAndrew Tridgell1-0/+62
(This used to be commit 51268c512dbae94aba308668df9facaf15a2ce9e)