summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clientgen.c
Commit message (Collapse)AuthorAgeFilesLines
* Use FUNCTION_MACRO, not __FUNCTION__Jelmer Vernooij2003-03-221-2/+2
|
* Clobber the 'SAFETY_MARGIN' in libsmb.Andrew Bartlett2003-03-211-3/+7
| | | | Andrew Bartlett
* Be parinoid, malloc an extra SAFETY_MARGIN on the client's inbuf and outbuf.Andrew Bartlett2003-03-151-2/+2
| | | | Andrew Bartlett
* Change the way we sign SMB packets, to a function pointer interface.Andrew Bartlett2003-03-091-3/+5
| | | | | | | | The intention is to allow for NTLMSSP and kerberos signing of packets, but for now it's just what I call 'simple' signing. (aka SMB signing per the SNIA spec) Andrew Bartlett
* Make it clear that this is a fstrcpy().Andrew Bartlett2003-03-081-2/+2
|
* (only for HEAD at the moment).Andrew Bartlett2003-02-091-2/+2
| | | | | | | | | | | | Add NTLMv2 support to our client, used when so configured ('client use NTLMv2 = yes') and only when 'client use spengo = no'. (A new option to allow the client and server ends to chose spnego seperatly). NTLMv2 signing doesn't yet work, and NTLMv2 is not done for NTLMSSP yet. Also some parinoia checks in our input parsing. Andrew Bartlett
* Add some return values, and don't attempt signing for NTLMSSP yet (it uses aAndrew Bartlett2003-02-021-0/+2
| | | | | | different algorithm). Andrew Bartlett
* More signing updates - start checking that the server isn't being spoofed.Andrew Bartlett2003-02-021-1/+4
| | | | Andrew Bartlett
* We now have client-side SMB signing support!Andrew Bartlett2003-02-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | This checking allows us to connect to Microsoft servers the use SMB signing, within a few restrictions: - I've not get the NTLMSSP stuff going - it appears to work, but if you break the sig - say by writing a zero in it - it still passes... - We don't currently verfiy the server's reply - It works against one of my test servers, but not the other... However, it provides an excellent basis to work from. Enable it with 'client signing' in your smb.conf. Doc to come (tomorrow) and this is not for 3.0, till we get it complete. The CIFS Spec is misleading - the session key (for NTLMv1 at least) is the standard session key, ie MD4(NT#). Thanks to jra for the early work on this. Andrew Bartlett
* BIG patch...Andrew Bartlett2003-01-021-1/+1
| | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett
* Forward port the change to talloc_init() to make all talloc contextsJeremy Allison2002-12-201-1/+1
| | | | | named. Ensure we can query them. Jeremy.
* Revert that stupid one line change.Richard Sharpe2002-11-011-1/+0
|
* Add more code to the profiles program and add Makefile.in support.Richard Sharpe2002-11-011-0/+1
|
* Added cli_set_timeout() call.Jeremy Allison2002-10-151-0/+11
| | | | Jeremy.
* Cope with rw errors and timeout to peer.Jeremy Allison2002-10-011-2/+3
| | | | Jeremy.
* Tidy up client error processing.Jeremy Allison2002-10-011-16/+15
| | | | Jeremy.
* Fixed typo.Jeremy Allison2002-10-011-1/+1
| | | | Jeremy.
* Added error string for server timeout on client call.Jeremy Allison2002-10-011-0/+2
| | | | Jeremy.
* Small, long overdue, fix for libsmbclient.Richard Sharpe2002-09-221-0/+19
|
* Merged Volkers (correct) fix from 2.2 for crash on unable to connect.Jeremy Allison2002-09-091-4/+6
| | | | Jeremy.
* Formatting tidyup and additon of cli_close_connection() before bugfix.Jeremy Allison2002-09-031-49/+55
| | | | Jeremy.
* Updates!Andrew Bartlett2002-08-261-1/+6
| | | | | | | | | | | - Don't print an uninitialised buffer in service.c - Change some charcnv.c functions to take smb_ucs2_t ** instead of void ** - Update NTLMv2 code to use dynamic buffers - Update experimental SMB signing code - still more work to do - Move sys_getgrouplist() to SAFE_FREE() and do a DEBUG() on initgroups() failure. Andrew Bartlett
* don't use spnego in the client unless enabled in smb.confAndrew Tridgell2002-08-221-1/+3
|
* Fix up some of the SMB signing code:Andrew Bartlett2002-06-161-2/+1
| | | | | | | | | | | | | 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.
* More of SMB signing for client - not yet finished (should be harmless).Jeremy Allison2002-06-141-9/+14
| | | | Jeremy.
* Move client_receive_smb to clientgen.c as a static, as proposed by Elrond.Andrew Bartlett2002-05-181-0/+35
| | | | | | | | | (only function that used it was unused, and this helps bring TNG and HEAD closer) Its also cleaner. Andrew Bartlett
* This removes --with-ssl from Samba.Andrew Bartlett2002-05-171-4/+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
* Another comment fix for mirmirAndrew Bartlett2002-03-011-1/+1
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Name another talloc.Andrew Bartlett2002-01-281-1/+1
|
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-1/+1
| | | | Jeremy.
* prevent a memory leak of cli structuresAndrew Tridgell2001-11-271-1/+7
|
* Add a new torture test to extract a NT->DOS error map from an NT member of aAndrew Bartlett2001-11-251-0/+7
| | | | | | | | | samba domain. The PDC must be running a special authenticaion module that spits out NT errors based on username. Andrew Bartlett
* One more patch from Tom Jansen. Hope I didn't break the tree :-)Richard Sharpe2001-11-211-0/+7
|
* Close the socket and set the file descriptor to -1 if there was a socketTim Potter2001-11-141-0/+9
| | | | error in cli_receive_smb() and cli_send_smb().
* Removed the "reestablish" code. Tridge - scream if this was needed....Jeremy Allison2001-11-141-9/+2
| | | | Jeremy.
* Parionia to ensure people don't install libsmb based programs setuid root.Andrew Bartlett2001-10-311-0/+6
| | | | | | | libsmb has not been written to be setuid, with things like LIBSMB_PROG allowing all sort of fun and games. Andrew Bartlett
* a quick fix to get rpcclient working again. This just disablesAndrew Tridgell2001-10-221-1/+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.
* added basic NTLMSSP support in smbd. This is still quite rough, andAndrew Tridgell2001-10-171-1/+1
| | | | | | loses things like username mapping. I wanted to get this in then discuss it a bit to see how we want to split up the existing session setup code
* added NTLMSSP authentication to libsmb. It seems to work well so I have ↵Andrew Tridgell2001-10-121-4/+1
| | | | enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM
* initial kerberos/ADS/SPNEGO support in libsmb and smbclient. ToAndrew Tridgell2001-10-111-3/+9
| | | | | | | | | | activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-4/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-11/+5
|
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-0/+3
| | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
* fixed handling of 139/445 in clientsAndrew Tridgell2001-08-241-4/+2
|
* A rewrite of the error handling in the libsmb client code. I've separatedTim Potter2001-08-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | out the error handling into a bunch of separate functions rather than all being handled in one big function. Fetch error codes from the last received packet: void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num); uint32 cli_nt_error(struct cli_state *); Convert errors to UNIX errno values: int cli_errno_from_dos(uint8 eclass, uint32 num); int cli_errno_from_nt(uint32 status); int cli_errno(struct cli_state *cli); Detect different kinds of errors: BOOL cli_is_dos_error(struct cli_state *cli); BOOL cli_is_nt_error(struct cli_state *cli); BOOL cli_is_error(struct cli_state *cli); This also means we now support CAP_STATUS32 as we can decode and understand NT errors instead of just DOS errors. Yay! Ported a whole bunch of files in libsmb to use this new API instead of the just the DOS error.
* Fixed another possible memleak in cli_initialise()Tim Potter2001-08-061-0/+6
|
* Cleaned up error handling in cli_initialise() to fix a memleak found byTim Potter2001-08-061-10/+14
| | | | Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
* added a oplock break handler hook to the client code, this allows for more ↵Andrew Tridgell2001-06-181-47/+7
| | | | complete testing of oplocks from smbtorture and would also be essential if a client app ever really did want to use oplocks properly