summaryrefslogtreecommitdiffstats
path: root/source/libsmb/cliconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* 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 :(
* 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
|
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-201-8/+20
| | | | | | | | 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-201-8/+5
| | | | | | wrappers. Andrew Bartlett
* checking for NULL really is counter-productive, and this one was alsoAndrew Tridgell2002-07-151-5/+0
| | | | generating a warning
* 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().
* 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-251-15/+26
| | | | | | few more places to use it. Andrew Bartlett
* Don't use uint. It doesn't exist on some platforms and we don't define it.Jeremy Allison2002-06-211-0/+8
| | | | | Replaced with "unsigned int". Jeremy.
* Two things: Check how many paramaters that the LDAP libs take for theAndrew Bartlett2002-06-161-5/+6
| | | | | | | | 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-161-17/+24
| | | | | | | | | | | | | 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
* Ok, now I can try my first client test...Jeremy Allison2002-06-141-8/+21
| | | | Jeremy.
* A couple of updates for the SmbEncrypt code, and some of its users.Andrew Bartlett2002-06-071-13/+31
| | | | | | | | | | (const, takes unix string as arg) Also update cli_full_connection to take NULL pointers as 'undefined' correctly, and therefore do its own lookup etc. This what was intended, but previously you needed to supply a 0.0.0.0 IP address. Andrew Bartlett
* More cleanup work preparing for SMB signing.Jeremy Allison2002-06-011-88/+104
| | | | Jeremy.
* Update some of the LM hash code to better respect the seperation betweenAndrew Bartlett2002-05-251-13/+14
| | | | | | | | | unix and DOS strings. This pushes all the 'have to uppercase, must be 14 chars' stuff behind the the interface. Andrew Bartlett
* Clean up a few unused functions, add a bit of static etc.Andrew Bartlett2002-05-251-1/+2
| | | | | | | | | | | | | | Importantly: The removal of the silly 'delete user script' behaviour when secuity=domain. I have left the name the same - as it still does the (previously documented, but not in smb.conf(5)) sane behaviour of deleting users on request. When we decide what to do with the 'add user' functionality, we might rename it. Andrew Bartlett
* Remove the password length paramater from cli_full_connection - it reallyAndrew Bartlett2002-05-241-5/+6
| | | | | | | | didn't make any sense, and its was always just strlen(password) anyway. This fixes it to be strlen(password)+1 Andrew Bartlett
* Given Jeremy's positive response, and a lack of one from tpot, I'll commitAndrew Bartlett2002-05-231-147/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this: More code cleanup - this lot a bit more dodgy than the last: The aim is to trim pwd_cache down to size. Its overly complex, and a pain to deal with. With a header comment like this: 'obfusticaion is planned' I think it deserved to die (at least partly). This was being done to allow 'cli_establish_connection' to die - its functionality has been replaced by cli_full_connection(), which does not duplicate code everywhere for creating names etc. This also removes the little 'init' fucntions for the various pipes, becouse they were only used in one place, and even then it was dodgy. (I've reworked smbcacls not to use anonymous connections any more, as this will (should) fail with a 'restrict anonymous' PDC). This allowed me to remove cli_pipe_util.c, which was calling cli_establish_connection. tpot: I'm not sure what direction you were going with the client stuff, and you may well have been wanting the init functions. If thats the case, give me a yell and I'll reimplement them against cli_full_connection. Andrew Bartlett
* This removes --with-ssl from Samba.Andrew Bartlett2002-05-171-13/+0
| | | | | | | | | | | | | | | | | This option was badly maintained, useless and confused our users and distirbutors. (its SSL, therfore it must be good...) No windows client uses this protocol without help from an SSL tunnel. I can't see any reason why setting up a unix-side SSL wrapper would be any more difficult than the > 10 config options this mess added to samba in any case. On the Samba client end, I think the LIBSMB_PROG hack should be sufficient to start stunnel on the unix side. We might extend this to take %i and %p (IP and port) if there is demand. Andrew Bartlett
* better handling of DOS LANMAN2.1 protocolAndrew Tridgell2002-04-151-4/+18
|
* Always pass NT password as well as Lanman.Jeremy Allison2002-04-061-1/+1
| | | | Jeremy.
* Removed duplicate \n from debug message.Tim Potter2002-03-061-21/+13
| | | | Small tidyups.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Fix a couple of memory leaks in the cli_establish_connection() code's failureAndrew Bartlett2002-01-201-0/+2
| | | | | | | | case. Thanks to Nigel Williams <nigel@wednesday.demon.co.uk> for spotting these! Andrew Bartlett
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-18/+18
| | | | Jeremy.
* fixed a crash bug in domain auth caused by an uninitialised nt_statusAndrew Tridgell2002-01-111-0/+2
|
* Fix up 'net ads join' to delete and rejoin if the account already exists.Andrew Bartlett2002-01-111-1/+1
| | | | | | | | This fixes up a problem where a machine would join (or downgrade by trust password change) to NT4 membership and not be able to regain full ADS membership until a 'net ads leave'. Andrew Bartlett
* Check for winbind separator in user name for cli_session_setup()Tim Potter2002-01-061-1/+2
| | | | Patch from Alexander Bokovoy <a.bokovoy@sam-solutions.net>
* Ensure the output cli can't have spurious values if the connection fails...Andrew Bartlett2001-12-311-1/+7
|
* - handle kerberos session setup reply with broken null terminationAndrew Tridgell2001-12-211-4/+5
| | | | - don't display Domain=[] for auth protocols that don't give us a domain
* try to handle end of packet for not null terminated domain stringsAndrew Tridgell2001-12-211-1/+3
|
* handle a NULL hostname in cli_connect()Andrew Tridgell2001-12-111-0/+3
|
* detect attempts to connect to names of the type NAME#xx and do aAndrew Tridgell2001-12-111-1/+11
| | | | | | netbios lookup for name NAME with node type xx. This affects all our client progs. Very useful :)
* when using non-encrypted password ignore the ntpass variable toAndrew Tridgell2001-12-041-2/+2
| | | | session setup
* This change reworkes the connection code for both rpcclient and net newAndrew Bartlett2001-12-031-1/+113
| | | | | | | | | | | 'net' untility. This should make it easier to port rpcclient code across to net. It also allows SPNEGO (the NTLMSSP subsystem in particular) to work, becouse it kills off the early destruction of the clear-text password. Andrew Bartlett
* fixed some krb5 ifdefsAndrew Tridgell2001-11-281-2/+2
|
* fixed a core dump in server level securityAndrew Tridgell2001-11-281-2/+4
|
* fix a bunch of places where we can double-free a cli structureAndrew Tridgell2001-11-281-4/+4
|
* Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter2001-11-261-2/+1
| | | | | | | and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip);
* use DEBUG() not d_printf() in librariesAndrew Tridgell2001-11-261-2/+2
|
* Add a new torture test to extract a NT->DOS error map from an NT member of aAndrew Bartlett2001-11-251-4/+1
| | | | | | | | | samba domain. The PDC must be running a special authenticaion module that spits out NT errors based on username. Andrew Bartlett
* This is another rather major change to the samba authenticaionAndrew Bartlett2001-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subystem. The particular aim is to modularized the interface - so that we can have arbitrary password back-ends. This code adds one such back-end, a 'winbind' module to authenticate against the winbind_auth_crap functionality. While fully-functional this code is mainly useful as a demonstration, because we don't get back the info3 as we would for direct ntdomain authentication. This commit introduced the new 'auth methods' parameter, in the spirit of the 'auth order' discussed on the lists. It is renamed because not all the methods may be consulted, even if previous methods fail - they may not have a suitable challenge for example. Also, we have a 'local' authentication method, for old-style 'unix if plaintext, sam if encrypted' authentication and a 'guest' module to handle guest logins in a single place. While this current design is not ideal, I feel that it does provide a better infrastructure than the current design, and can be built upon. The following parameters have changed: - use rhosts = This has been replaced by the 'rhosts' authentication method, and can be specified like 'auth methods = guest rhosts' - hosts equiv = This needs both this parameter and an 'auth methods' entry to be effective. (auth methods = guest hostsequiv ....) - plaintext to smbpasswd = This is replaced by specifying 'sam' rather than 'local' in the auth methods. The security = parameter is unchanged, and now provides defaults for the 'auth methods' parameter. The available auth methods are: guest rhosts hostsequiv sam (passdb direct hash access) unix (PAM, crypt() etc) local (the combination of the above, based on encryption) smbserver (old security=server) ntdomain (old security=domain) winbind (use winbind to cache DC connections) Assistance in testing, or the production of new and interesting authentication modules is always appreciated. Andrew Bartlett
* - make sure we use a non-zero session id so we can have multiple connsAndrew Tridgell2001-11-201-8/+4
| | | | | | | | open to w2k - fix the string handling in the device name to match NT and smbd - don't pull the domain from negprot if CAP_EXTENDED_SECURITY is set
* Removed the "reestablish" code. Tridge - scream if this was needed....Jeremy Allison2001-11-141-51/+0
| | | | Jeremy.
* free the negTokenInit structureAndrew Tridgell2001-11-051-0/+2
|
* merge from 2.2. Why is STR_CONVERT missing when comparingGerald Carter2001-11-051-1/+1
| | | | 2.2 to HEAD?
* This patch applied, except without the structure changes to nmblib.cAndrew Bartlett2001-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andrew Bartlett. From kai@cmail.ru Mon Oct 29 18:50:42 2001 Date: Fri, 19 Oct 2001 17:26:06 +0300 From: Andrew V. Samoilov <kai@cmail.ru> To: samba-technical@lists.samba.org Subject: [patch]: makes some arrays const to be shared between processes Hi! This patch makes some arrays const. So these arrays go to text/rodata segment and are shared between all of the processes which use shared library with these arrays. Regards, Andrew V. Samoilov. P.S. Please cc your answer to kai@cmail.ru, I don't subscribed to this list. ChangeLog: * cliconnect.c (prots): Make const. * clierror.c (rap_errmap): Likewise. * nmblib.c (nmb_header_opcode_names): Likewise. (lookup_opcode_name): Make opcode_namep const. Eliminate i. * nterr.c (nt_err_code_struct): Typedef const. * smberr.c (err_code_struct): Make const. (err_classes): Likewise.
* more compiler warningsHerb Lewis2001-10-231-2/+2
|
* a quick fix to get rpcclient working again. This just disablesAndrew Tridgell2001-10-221-0/+4
| | | | | | | NTLMSSP in cli_establish_connection() What we really need to do is kill off the pwd_cache code. It is horrible, and assumes the challenge comes in the negprot reply.