1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

118 Commits

Author SHA1 Message Date
Jeremy Allison
6b9dbbcd24 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
(This used to be commit b4ea493599)
2004-03-13 02:16:21 +00:00
Jeremy Allison
fd2d4f87d4 First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
(This used to be commit 966e49a48c)
2004-03-13 00:28:53 +00:00
Andrew Bartlett
e45c217a14 Make get_dc_list static - we only ask for a sorted list externally.
Andrew Bartlett
(This used to be commit e10e176c83)
2004-02-08 00:54:32 +00:00
Gerald Carter
b085f0f08e * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
(This used to be commit bca702c976)
2004-01-13 19:42:53 +00:00
Andrew Bartlett
f1f24c7c6f Romve debugging assertions (oops...)
Andrew Bartlett
(This used to be commit 7e75a6d681)
2004-01-09 02:47:35 +00:00
Andrew Bartlett
9e1c7dd516 Add a new type of name lookup 'ads'. This seperates this from normal
hostname lookups, and ensures that we don't lookup 'short' (ie NetBIOS)
domain names in DNS.

Andrew Bartlett
(This used to be commit 35f6347a73)
2004-01-09 02:38:58 +00:00
Jeremy Allison
ee17580c85 Make intent to return only one address clear.
Jeremy.
(This used to be commit d3d0353bae)
2003-12-09 02:29:27 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Gerald Carter
d304a61cc7 fix bug #190; WINS server was getting marked as dead when it was not.
(This used to be commit fa354f3cee)
2003-07-03 04:54:49 +00:00
Gerald Carter
f51d769dd3 large change:
*)  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 d7f7fcda42)
2003-06-25 17:41:05 +00:00
Gerald Carter
f36c96d59c * s/get_dc_name/rpc_dc_name/g (revert a previous change)
* move back to qsort() for sorting IP address in get_dc_list()

* remove dc_name_cache in cm_get_dc_name() since it slowed
  things down more than it helped.  I've made a note of where
  to add in the negative connection cache in the ads code.
  Will come back to that.

* fix rpcclient to use PRINTER_ALL_ACCESS for set printer (instead
  of MAX_ALLOWED)

* only enumerate domain local groups in our domain

* simplify ldap search for seqnum in winbindd's rpc backend
(This used to be commit f8cab8635b)
2003-06-23 19:05:23 +00:00
Jeremy Allison
292a51eda1 Forward port the app-head changes for dc name cache into 3.0.
Jeremy.
(This used to be commit 8bcc3116a2)
2003-06-13 21:03:15 +00:00
Volker Lendecke
7f0740b7c0 Revert a patch that somehow slipped in...
Volker
(This used to be commit 6cde3d4d65)
2003-05-08 08:12:57 +00:00
Volker Lendecke
d1da999e0a This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more
roundtrips for the second PIPE open and bind. With this patch logging
in to a member server is a matter of two (three if you count the
ack...) packets between us and the DC.

Volker
(This used to be commit 5b3cb7725a)
2003-05-08 08:02:52 +00:00
Jeremy Allison
d45fe965ef Writable string const fixes.
Jeremy.
(This used to be commit c832e95c2f)
2003-03-05 01:30:15 +00:00
Jeremy Allison
3fe0de1fcf Correctly check for inet_addr fail. Patch from gregor.7@osu.edu.
Jeremy.
(This used to be commit 01f6b26945)
2003-02-17 21:19:00 +00:00
Andrew Bartlett
863e9ca2c6 Merge from HEAD - mimir's new gencache based namecache code.
Andrew Bartlett
(This used to be commit f79324f730)
2003-01-04 08:48:15 +00:00
Gerald Carter
779ec8d3cf [merge] remove assert(count ==1) for multi-homed PDCs; CR 1277
(This used to be commit 18799c115b)
2002-12-04 19:01:01 +00:00
Jeremy Allison
0694e965fb Doing janitorial duty for tpot - memory leak fix.
Jeremy.
(This used to be commit 7acf959421)
2002-12-04 18:39:50 +00:00
Jeremy Allison
d047db2807 Fixup of ordered cleanup of get_dc_list - bug found by Dominik 'Aeneas' Schnitzer <dominik@schnitzer.at>
Jeremy.
(This used to be commit 15185ac437)
2002-12-01 00:45:07 +00:00
Gerald Carter
3ab6fcc5c6 [merge from APP_HEAD]
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 016ef8b36b)
2002-11-23 14:52:34 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Tim Potter
ab1cf8d1cf Merge of get_dc_list() api change from HEAD.
(This used to be commit 6ba7847ce2)
2002-11-06 05:14:15 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Jean-François Micouleau
8ad60283be small change in name_resolve_bcast()
spotted by alexander bokovoy.

it shouldn't break anything. if it's wrong, feel free to revert but
explain why.

	J.F.
(This used to be commit 638c692525)
2002-04-04 15:50:28 +00:00
Tim Potter
bf555a158a Don't try to sort a list of zero length in internal_resolve_name()
(This used to be commit 5387e4046f)
2002-03-19 05:35:06 +00:00
Jeremy Allison
df43f3d410 Ensure that winbindd and smbd both use identical logic to find dc's.
Fix bug where zeroip addresses were being checked.
Jeremy.
(This used to be commit 8ed49fe0df)
2002-02-28 01:05:15 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
1f670cfb27 Spelling fixes.
(This used to be commit e67c7c5852)
2002-01-20 22:50:23 +00:00
Tim Potter
21a6c34485 Made a debug look nicer.
(This used to be commit aca0edc819)
2002-01-17 05:07:36 +00:00
Tim Potter
bf7c56665c Merge of name_status_find() debugs.
(This used to be commit cfac669017)
2002-01-16 01:41:30 +00:00
Andrew Tridgell
034a855d73 cope with direct IP addresses in resolve_name()
(This used to be commit 73a59170e6)
2002-01-11 09:48:27 +00:00
Andrew Tridgell
3fb5e2867c make sure resolve_name() only returns valid IP addresses
this is actually a workaround for old broken nmbd daemons, especially
from Samba 2.0
(This used to be commit 12021a8de6)
2002-01-11 00:23:29 +00:00
Tim Potter
d42fc03e9b Merge from appliance-head:
- put in some level 10 debugs so we can see what internal_resolve_name()
   is doing

 - remove duplicates from returned ip list of internal_resolve_name()
(This used to be commit 08d2bcef1a)
2002-01-09 04:26:41 +00:00
Andrew Bartlett
f358c51618 Add a touch of const
(This used to be commit b2af4372b1)
2002-01-05 01:33:45 +00:00
Andrew Bartlett
7b0b556804 Fix up funtion name, as this finds local, not domain master browsers.
(as per tridge's instructions)
(This used to be commit 0692d792f2)
2001-12-04 04:45:17 +00:00
Tim Potter
ff27a326f1 I think the lookup_pdc_name() should be called lookup_dc_name() and the
name_status_find() call here should look up a #1c name instead of #1d.
This fixes some bugs currently with BDC authentication in winbindd and in
smbd as you can't query the #1d name with the ip address of a BDC.

Who is Uncle Tom Cobbley anyway?
(This used to be commit 4215048f7b)
2001-11-29 05:50:32 +00:00
Jeremy Allison
a6b73b9767 Cross merge to make 2.2 and HEAD closer.
Jeremy.
(This used to be commit 39f076b56c)
2001-11-28 02:42:55 +00:00
Andrew Tridgell
df81a6ec23 increment the value not the pointer
(This used to be commit e3698259af)
2001-11-26 09:28:00 +00:00
Jeremy Allison
86dee43f39 Use "password server" for searching for BDC's also as Tim suggested.
Jeremy.
(This used to be commit 4aca67761f)
2001-11-25 06:38:17 +00:00
Jeremy Allison
f146325e7d W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
(This used to be commit 54c968913d)
2001-11-21 23:00:59 +00:00
Martin Pool
8654a161c8 LMHOSTSFILE is now dynamically configured too.
(This used to be commit a779710fff)
2001-11-19 03:12:10 +00:00
Steve French
2113e2ba08 Add function to add those hosts who have added msbrowse (domain master browsers)
(This used to be commit 3fd96a4754)
2001-11-07 23:01:44 +00:00
Jeremy Allison
30be58a857 Got serious about const again.
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in....
They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure
it's not being used correctly....
Jeremy.
(This used to be commit b1930abb35)
2001-11-04 00:14:08 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
acc3732971 typo
(This used to be commit 23dc3fc700)
2001-09-17 03:44:52 +00:00
Simo Sorce
bcbd75f7ad move to SAFE_FREE()
(This used to be commit 48fc6a6cd5)
2001-09-17 03:33:37 +00:00
Andrew Tridgell
79139fe8d8 convert more code to use XFILE
(This used to be commit fe6679dffb)
2001-09-10 12:46:42 +00:00
Richard Sharpe
ba8e3e0343 Make sure that if there are no interfaces, name_register_wins does not
segfault.
(This used to be commit a7842fac94)
2001-09-09 09:59:33 +00:00