summaryrefslogtreecommitdiffstats
path: root/source/include/client.h
Commit message (Collapse)AuthorAgeFilesLines
* signed/unsigned fixAndrew Bartlett2003-03-151-2/+2
|
* Change size parameters from signed to unsigned to fix up warnings.Jeremy Allison2003-03-121-1/+1
| | | | Jeremy.
* Change the way we sign SMB packets, to a function pointer interface.Andrew Bartlett2003-03-091-6/+7
| | | | | | | | 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
* Add the 'session key' output of the NTLMSSP exchange to the cli struct, soAndrew Bartlett2003-02-161-0/+4
| | | | | | | | | it can be used for 'net rpc join'. Also fix a bug in our server-side NTLMSSP code - a client without any domain trust links to us may calculate the NTLMv2 response with "" as the domain. Andrew Bartlett
* (only for HEAD at the moment).Andrew Bartlett2003-02-091-1/+1
| | | | | | | | | | | | 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
* We now have client-side SMB signing support!Andrew Bartlett2003-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix client large file reporting.Jeremy Allison2002-12-101-1/+1
| | | | Jeremy
* Cope with rw errors and timeout to peer.Jeremy Allison2002-10-011-1/+1
| | | | Jeremy.
* Added error string for server timeout on client call.Jeremy Allison2002-10-011-0/+1
| | | | Jeremy.
* Header file change from last commit.Andrew Bartlett2002-08-261-0/+1
|
* Update cli_full_connection() to take a 'flags' paramater, and try to get aAndrew Bartlett2002-06-251-0/+4
| | | | | | few more places to use it. Andrew Bartlett
* Fix up some of the SMB signing code:Andrew Bartlett2002-06-161-0/+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
* More of SMB signing for client - not yet finished (should be harmless).Jeremy Allison2002-06-141-1/+2
| | | | Jeremy.
* Removed eff_name field from cli_struct as it wasn't being used anywhere.Tim Potter2002-06-121-1/+0
|
* Removed some unused variables - tidy up some formating, add struct toJeremy Allison2002-05-311-0/+9
| | | | | client state to implement smb signing - this is a test at present. Jeremy.
* Removed some random crap that isn't used anymore.Tim Potter2002-02-161-1/+0
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* struct cli_state remembers the pipe name that it's talking to, if any,Martin Pool2002-01-021-0/+3
| | | | so that we can print it in later debug messages.
* prevent a memory leak of cli structuresAndrew Tridgell2001-11-271-0/+4
|
* oops, I forgot to include the header fileAndrew Bartlett2001-11-251-0/+2
|
* a quick fix to get rpcclient working again. This just disablesAndrew Tridgell2001-10-221-0/+1
| | | | | | | 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 NTLMSSP authentication to libsmb. It seems to work well so I have ↵Andrew Tridgell2001-10-121-1/+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-1/+2
| | | | | | | | | | 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
* added a little smbtorture test for dumping the unicode table of aAndrew Tridgell2001-09-251-1/+1
| | | | | | | | | server. This is just a framework right now - I want this to eventually replace the win32 test code from monyo The interesting this about this test is that it shows up a really horrible performance bug in our stat cache code. I'll see if I can fix it.
* Removed nt_error field from cli_state as it was not used anywhere.Tim Potter2001-08-101-1/+0
|
* added a oplock break handler hook to the client code, this allows for more ↵Andrew Tridgell2001-06-181-0/+3
| | | | complete testing of oplocks from smbtorture and would also be essential if a client app ever really did want to use oplocks properly
* to use the same macros in the client and server rename the CLISTR_Andrew Tridgell2001-03-101-7/+0
| | | | macros to STR_
* made some LANMAN1 wildcard progressAndrew Tridgell2001-02-261-0/+1
| | | | it now handles -M LANMAN1 -f '.x' -m '?x' nicely
* added support for a CLISTR_ASCII flag so we can use a uniformAndrew Tridgell2001-02-211-0/+1
| | | | interface for ascii-only fields
* initial client side unicode support (needed for netapp filer)Andrew Tridgell2001-02-201-0/+6
| | | | | | | | | | | | | | | I've currently got this code disabled by default as it is incomplete. You enable it by setting a USE_UNICODE environment variable. Once the support is complete this check will be removed and the CAP_UNICODE capability bit will be the sole determination of whether the client library code uses unicode right now I have converted session_setup and tconx. I will do more fns over the next few days. see clistr.c for the new client side string interface. Luckily it tends to make the code smaller and neater while adding unicode support.
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-0/+1
| | | | | | | | | a byte range lock (write lock only, but Win2k breaks on read lock also so I do the same) - if you think about why, this is obvious. Also fixed our client code to do level II oplocks, if requested, and fixed the code where we would assume the client wanted level II if it advertised itself as being level II capable - it may not want that. Jeremy.
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy.
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-031-0/+2
| | | | | | | | | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. The changes to the header files were minor. A few struct's and a few additional fields to existing ones. No deletions. **minimal change necessary** :-) Well, maybe not minimal, but I tried. All other programs compile, link and run ok from what I can tell so I don;t think I broke anything. --jerry
* YIPEE!!!!!Andrew Tridgell2000-04-301-0/+1
| | | | | | | | | | | We finally have a perfect emulation of Microsoft wildcard matching. The routine ms_fnmatch() does wildcard matching with all MS wildcards (including the unicode wildcards), and masktest against a NT4 workstation with hundreds of thousands of random exmaples has not found a single error. amazingly it is only about 60 lines of code, but it has taken us years to get it right. I didn't sleep much last night :)
* simple mods to add msrpc pipe redirection. default behaviour: fall backLuke Leighton2000-01-031-15/+0
| | | | to using internal msrpc code in smbd.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-16/+27
|
* ABOUT TIME!!!!!!!!Luke Leighton1999-12-081-33/+3
| | | | | | | | | | | | | | | damn, this one is bad. started, at least two days ago, to add an authentication mechanism to the smbd<->msrpc redirector/relay, such that sufficient unix / nt information could be transferred across the unix socket to do a become_user() on the other side of the socket. it is necessary that the msrpc daemon inherit the same unix and nt credentials as the smbd process from which it was spawned, until such time as the msrpc daemon receives an authentication request of its own, whereupon the msrpc daemon is responsible for authenticating the new credentials and doing yet another become_user() etc sequence.
* starting "connection reuse" system in smb-agent. added version numberLuke Leighton1999-12-031-0/+1
| | | | which isn't actually used right now :-)
* cool! a unix socket smb redirector. code based on smbfilter andLuke Leighton1999-12-031-0/+1
| | | | | | | | ideas from ssh-agent. the intent is to be able to share smb sessions using cli_net_use_add() across multiple processes, where one process knows the target server name, user name and domain, but not the smb password.
* first attempt at getting \PIPE\NETLOGON working. it's pretty horrible.Luke Leighton1999-11-291-3/+0
|
* further abstraction involving client states. main client-side codeLuke Leighton1999-11-271-0/+2
| | | | | is pretty much independent of SMB client states, which will make it easier to add other transports.
* ok. *whew*. this is the first completed part of the restructure.Luke Leighton1999-11-241-6/+14
| | | | | | | | | | | | verified that lsaquery, lsalookupsids work, and found some bugs in the parameters of these commands :-) soo... we now have an lsa_* api that has the same arguments as the nt Lsa* api! cool! the only significant coding difference is the introduction of a user_credentials structure, containing user, domain, pass and ntlmssp flags.
* you know what? this sort of thing makes me laugh. hmm, what functionsLuke Leighton1999-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | have we got. and what data do we have. hmm.. i wonder what the NTLMv2 user session key can be... hmmm... weell.... there's some hidden data here, generated from the user password that doesn't go over-the-wire, so that's _got_ to be involved. and... that bit of data took a lot of computation to produce, so it's probably _also_ involved... and md4 no, md5? no, how about hmac_md5 yes let's try that one (the other's didn't work) oh goodie, it worked! i love it when this sort of thing happens. took all of fifteen minutes to guess it. tried concatenating client and server challenges. tried concatenating _random_ bits of client and server challenges. tried md5 of the above. tried hmac_md5 of the above. eventually, it boils down to this: kr = MD4(NT#,username,domainname) hmacntchal=hmac_md5(kr, nt server challenge) sess_key = hmac_md5(kr, hmacntchal);
* improving authentication code (tidyup).Luke Leighton1999-06-291-8/+19
|
* Putting back the -p flag in smbclient.Richard Sharpe1999-01-251-0/+1
| | | | | However, it seems that the -s flag in smbclient is also ignored :-(
* removed nt_pipe_fnum from struct cli_state. need to be able to callLuke Leighton1998-12-071-1/+0
| | | | | | LsaLookupSids etc from within SamrQueryAliasMembers, for example. fnum is now a parameter to client functions. thanks to mike black for starting the ball rolling.
* .cvsignore: Removed old entries.Herb Lewis1998-11-121-0/+9
| | | | | | | | | | | | client/client.c: include/client.h: Added some debug messages that the old client used to generate. These are needed to make scripts such as 'findsmb' work - there may be other changes to keep backwards output compatibility. Do we need a -old-client-compat argument ? libsmb/clientgen.c: Fixed crash bug where malloc'ed data wasn't being cleared - corrupted malloc chains. web/swat.c: John's changes to get rid of "ghost" table entries.
* Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.Jeremy Allison1998-11-091-1/+1
| | | | | | | | | | | | | client/client.c: client/clitar.c: include/client.h: smbwrapper/smbw_dir.c: smbwrapper/smbw_stat.c: smbwrapper/smbw.c: lib/util.c: Converted all use of 'mode' to uint16. smbd/quotas.c: Fixed stupid comment bug I put in there :-(. printing/printing.c: Fix from J.F. to new code. Jeremy.
* volker was concerned about unique inode numbers and smbsh. This set ofAndrew Tridgell1998-10-241-9/+9
| | | | | | changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to try to provide inode numbers. If it is 0 then use the hash of the filename as before.
* bug-fixing against:Luke Leighton1998-10-151-0/+2
| | | | | | | | | | | | | | | | | | AS/U: it returns dce/rpc "first" and "last" bits _clear_ in a bind/ack response, when they should be set in a (small) packet. they also, in the bind/ack do not set a secondary address string at all, so we can't check against that... Win95: client-side dce/rpc code is a bit odd. it does a "WaitNamedPipeState" and has slightly different pipe-naming (\PIPE\LANMAN is joined by \PIPE\SRVSVC, \PIPE\WINREG etc whereas nt just has \PIPE\LANMAN and \PIPE\). Win95-USRMGR.EXE: added LsaOpenPolicy (renamed existing to LsaOpenPolicy2). added SamrConnect (renamed existing to SamrConnect2).