summaryrefslogtreecommitdiffstats
path: root/source/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* Merge of netbios namecache code from APPLIANCE_HEAD.Tim Potter2002-08-162-4/+276
| | | | | | | Tridge suggested a generic caching mechanism for Samba to avoid the proliferation of little cache files hanging around limpet like in the locks directory. Someone should probably implement this at some stage.
* Fix NTLMSSP challenge command and auth response. We can now service joinsJim McDonough2002-08-151-0/+61
| | | | | from win2k AND still use SPNEGO (provided you don't build with kerberos...I still have to fix that, as we are not properly falling back).
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm
* fixed a bug where we were truncating the returned names in a netbiosAndrew Tridgell2002-08-031-1/+1
| | | | | name status query to 14 bytes, so we could not join a DC who had a netbios name of 15 bytes in length.
* Moved rpc client routines from libsmb back to rpc_client where they belong.Tim Potter2002-08-029-6501/+0
|
* added 'disable netbios = yes/no' option, default is noAndrew Tridgell2002-07-311-2/+31
| | | | | | | | | | | | | When this option is disabled we should not do *any* netbios operations. You should also not start nmbd at all. I have put initial checks in at the major points we do netbios operations in smbd but there are bound to be more needed. Right now I've disabled all netbios name queries, all WINS lookups and node status queries in smbd and winbindd. I've been testing this option and the most noticable thing is how much more responsive things are! wthout those damn netbios timeouts things certainly are much slicker.
* this fixes plaintext passwords with win2000Andrew Tridgell2002-07-301-3/+2
| | | | | | | | | | there were 2 bugs: 1) we were sending a null challenge when we should have sent an empty challenge 2) the password can be in unicode if unicode is negotiated. This means our client code was wrong too :(
* Some crash fixes for netshareenum returning zero shares.Tim Potter2002-07-301-0/+3
|
* Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busyAndrew Bartlett2002-07-272-4/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | again, and has added 'net rpc trustdom list' support. This lists the trusted and trusting domains of a remote PDC. I've applied these almost directly, just fixing some special case code for when there are *no* trusting domains. We still have some parse errors in this case however. Andrew Bartlett. From mimir's e-mail: Here are another patches adding trust relationship features. More details: Better error reporting in cli_lsa_enum_trust_dom(). Implementation of cli_samr_enum_dom_users() which cli_samr.c lacked. More "consts" -- one of arguments in net_find_dc(). Modified implementation of run_rpc_command() -- now it allows to reuse already opened connection (if it is passed) to remote server's IPC$ (e.g. as part of longer exchange of rpc calls). I'm sure Andrew will argue ;-) More neat version of rpc_trustdom_list() function.
* Mimir has been busy with patches again, and sent in the followingAndrew Bartlett2002-07-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | patches: Andrew Bartlett From his e-mail: Below I attach the following patches as a result of my work on trusted domains support: 1) srv_samr_nt.c.diff This fixes a bug which caused to return null string as the first entry of enumerated accounts list (no matter what entry, it was always null string and rid) and possibly spoiled further names, depeding on their length. I found that while testing my 'net rpc trustdom list' against nt servers and samba server. 2) libsmb.diff Now, fallback to anonymous connection works correctly. 3) smbpasswd.c.diff Just a little fix which actually allows one to create a trusting domain account using smbpasswd 4) typos.diff As the name suggests, it's just a few typos fix :)
* fixed a segv in net time when the host is unavailableAndrew Tridgell2002-07-221-1/+1
|
* Renamed all the new_cli_netlogon_* functions to cli_netlogon_*Tim Potter2002-07-212-16/+16
| | | | as they're no longer new!
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-204-12/+24
| | | | | | | | distinction between uchar and char). Lots of const etc. Andrew Bartlett
* Fix up char/uchar casts etc. Fix up comments on some of the password hashAndrew Bartlett2002-07-202-12/+9
| | | | | | wrappers. Andrew Bartlett
* Add support for a weird behaviour apparently used by Win9X pass-throughAndrew Bartlett2002-07-201-2/+2
| | | | | | | | | | authentication - we can have an NT hash in the LM hash feild. (I need to double-check this fix with tpot, who discovered it). Also remove silly casts back and forth between uchar and char. Andrew Bartlett
* fixed a number of real bugs found by warnings on the 64 bit irix compilerAndrew Tridgell2002-07-151-2/+1
|
* checking for NULL really is counter-productive, and this one was alsoAndrew Tridgell2002-07-151-5/+0
| | | | generating a warning
* fix directory listing on win9x.Andrew Tridgell2002-07-131-3/+7
| | | | | it turns out this is tricky to get right for both win9x and w2k with and without unicode. This patch seems to do the trick.
* Some fix ups but committing so Andrew can look at the problem I have.Richard Sharpe2002-07-131-7/+1
|
* Fix up the include file that had problems as well.Richard Sharpe2002-07-131-11/+0
|
* Add these two files I forgot.Richard Sharpe2002-07-132-0/+476
|
* Fix some multibyte problems that I forgot about.Richard Sharpe2002-07-131-6/+6
|
* Commit Tom Jansen's changes to head.Richard Sharpe2002-07-111-819/+899
|
* fix declaration of global_in_nmbdAndrew Tridgell2002-07-091-1/+1
|
* Fixed incorrect debug.Tim Potter2002-07-041-1/+1
|
* Make these functions static. These are not mentioned in the external header,Andrew Bartlett2002-07-031-4/+4
| | | | | | | | and appear to be functions for internal use. Richard: please check. Andrew Bartlett
* Add my copyright (which I should have added months ago...)Andrew Bartlett2002-07-031-0/+1
|
* used findstatic.pl to make some variables static and remove some deadAndrew Tridgell2002-07-011-99/+0
| | | | code
* bias the lookup sorting towards directly reachable IPsAndrew Tridgell2002-07-011-0/+8
|
* sort name query responses by how far they are from our interfaceAndrew Tridgell2002-07-012-2/+43
| | | | | broadcast addresses. This makes it far more likely that we will try to talk to an interface that is routable from one of our interfaces.
* The 17-bit length field in the header contains the number ofChristopher R. Hertel2002-07-011-1/+8
| | | | | | | | | | | | | | | | | | bytes which follow the header, not the full packet size. [Yes, the length field is either 17-bits, or (per the RFCs) it is a 16-bit length field preceeded by an 8-bit flags field of which only the low-order bit may be used. If that bit is set, then add 65536 to the 16-bit length field. (In other words, it's a 17-bit unsigned length field.) ...unless, of course, the transport is native TCP [port 445] in which case the length field *might* be 24-bits wide.] Anyway, the change is a very minor one. We were including the four bytes of the header in the length count and, as a result, sending four bytes of garbage at the end of the SESSION REQUEST packet. Small fix in function cli_session_request().
* make net join a bit less verboseAndrew Tridgell2002-06-282-2/+2
| | | | these errors happen all the time, so they shouldn't be level 0
* Proper merge of all the working printing stuff from APPLIANCE_HEAD.Jeremy Allison2002-06-282-4/+227
| | | | | Now let's keep this in sync ! Jeremy.
* fixed a link problem with global_in_nmbdAndrew Tridgell2002-06-271-1/+1
|
* The next phase in the WINS rewrite!Andrew Tridgell2002-06-271-6/+10
| | | | | | | | | | | | | | | | We now cope wiith multiple WINS groups and multiple failover servers for release and refresh as well as registration. We also do the regitrations in the same fashion as W2K does, where we don't try to register the next IP in the list for a name until the WINS server has acked the previos IP. This prevents us flooding the WINS server and also seems to make for much more reliable multi-homed registration. I also changed the dead WINS server code to mark pairs of IPs dead, not individual IPs. The idea is that a WINS server might be dead from the point of view of one of our interfaces, but not another, so we need to keep talking to it on one while moving onto a failover WINS server on the other interface. This copes much better with partial LAN outages and weird routing tables.
* Using 1 for a tdb hash size makes for slow inserts....Jeremy Allison2002-06-271-1/+1
| | | | Jeremy.
* resolve_wins() now needs to be a public functionAndrew Tridgell2002-06-261-2/+2
|
* This commit finally gives us multiple wins server groups. We nowAndrew Tridgell2002-06-261-43/+68
| | | | | | | | | | | | | | | | | | | | | | | | accept an extended syntax for 'wins server' like this: wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1 The tags before the IPs don't mean anything, they are just a way of grouping IPs together. If you use the old syntax (ie. no ':') then an implicit group name of '*' is used. In general I'd recommend people use interface names for the group names, but it doesn't matter much. When we register in nmbd we try to register all our IPs with each group of WINS servers. We keep trying until all of them are registered with every group, falling back to the failover WINS servers for each group as we go. When we do a WINS lookup we try each of the WINS servers for each group. If a WINS server for a group gives a negative answer then we give up on that group and move to the next group. If it times out then we move to the next failover wins server in the group. In either case, if a WINS server doesn't respond then we mark it dead for 10 minutes, to prevent lengthy waits for dead servers.
* removed the wins name registration code from libsmbclientAndrew Tridgell2002-06-262-229/+158
| | | | | | | | | | | it is *completely* bogus for our client code to be doing wins registrations. Not only is it slow as hell (think about when a wins server is down) but how the heck is going to answer the queries that will later come in for our name? And what happens when libsmbclient sends registrations and nmbd then gets the WACK response from the wins server? we end up losing our name! Name registration is a job for nmbd, not for clients.
* - completely rewrote the wins_srv.c code. It is now much simpler, andAndrew Tridgell2002-06-261-3/+3
| | | | | | | | | | | | | | gives us a good grounding to properly support multiple wins servers for different interfaces (which will be coming soon ...) - fixed our wins registration failover code to actually do failover! We were not trying to register with a secondary wins server at all when the primary was down. We now fallback correctly. - fixed the multi-homed name registration packets so that they work even in a non-connected network (ie. when one of our interfaces is not routable from the wins server. Yes, this really happens in the real world).
* reverted some bogus test code that jeremy accidentally committedAndrew Tridgell2002-06-261-8/+0
|
* Update cli_full_connection() to take a 'flags' paramater, and try to get aAndrew Bartlett2002-06-252-16/+28
| | | | | | few more places to use it. Andrew Bartlett
* Kill off unnecessary cast.Andrew Bartlett2002-06-251-2/+3
|
* Don't use uint. It doesn't exist on some platforms and we don't define it.Jeremy Allison2002-06-214-7/+15
| | | | | Replaced with "unsigned int". Jeremy.
* Two things: Check how many paramaters that the LDAP libs take for theAndrew Bartlett2002-06-162-9/+12
| | | | | | | | rebind proc (some give an extra paramter to pass a void* paramater) and some small changes for the SMB signing code to reset things when the signing starts, and to 'turn off' signing if the session setup failed. Andrew Bartlett
* Fix up some of the SMB signing code:Andrew Bartlett2002-06-164-19/+46
| | | | | | | | | | | | | The problem was that *all* packets were being signed, even packets before signing was set up. (This broke the session request). This fixes it to be an 'opt in' measure - that is, we only attempt to sign things after we have got a valid, non-guest session setup as per the CIFS spec. I've not tested this against an MS server, becouse my VMware is down, but at least it doesn't break the build farm any more. Andrew Bartlett
* Fix spelling typo.Jeremy Allison2002-06-141-2/+2
| | | | Jeremy.
* Ok, now I can try my first client test...Jeremy Allison2002-06-142-8/+33
| | | | Jeremy.
* More of SMB signing for client - not yet finished (should be harmless).Jeremy Allison2002-06-142-9/+41
| | | | Jeremy.
* Removed eff_name field from cli_struct as it wasn't being used anywhere.Tim Potter2002-06-121-1/+2
|