summaryrefslogtreecommitdiffstats
path: root/source/libsmb
Commit message (Collapse)AuthorAgeFilesLines
* smb-agent improvements. added -D (daemon) option. smb agent isLuke Leighton1999-12-031-2/+4
| | | | | restricted to connections from the current user (socket is created with current user uid).
* cool! a unix socket smb redirector. code based on smbfilter andLuke Leighton1999-12-032-0/+119
| | | | | | | | 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.
* new get_any_dc_name() function allows lookups of trusted domains fromLuke Leighton1999-12-021-15/+14
| | | | | | | | | | | | | | | lp_trusted_domains() parameter, so trusted domain logins should work, right, if you put user = TRUSTED_DOMAIN\NTuser in "domain name map", right? right - as _long_ as you're not using NTLMv2, because the damn NT username gets mapped to the damn unix name too early, and NTLMv2 challenge-responses are based on the client's user name, client's domain name, client's host name etc damn etc. so it becomes necessary to stop using char* username because this allows for massive amounts of confusion as to which username is being referred to. the underlying unix username on the local unix system that is associated with the smbd process that represents the NT username? or the NT username itself?
* cleaning up: removing those horrible references to server listLuke Leighton1999-12-021-2/+1
| | | | | functions (cli_net_use_addlist()). needed originally because there was no get_dc_any_name() function.
* added get_any_dc_name() function.Luke Leighton1999-12-021-32/+122
|
* default SID map now reads in "trusted domains" from smb.conf.Luke Leighton1999-12-021-3/+5
|
* clearing up connection-related stuff. password credentials were messingLuke Leighton1999-12-021-9/+1
| | | | | | | up. added a complicated prompt which i don't like, but it tells you domain\user@hostname$
* more cli_session_setup() calls. what the heck are these doing???Luke Leighton1999-12-011-1/+1
| | | | | | | they should all be replaced with cli_establish_connection(). created cli_use_wait_keyboard() which waits on multiple cli_states and swallows session keepalives.
* 1) when no domain used in ntlogin test command, should use default oneLuke Leighton1999-12-012-20/+79
| | | | | | | | | | | | | | from previous lsaquery command. over-ridden from DOMAIN\username 2) initialisation of cli_state is a little more specific: sets use_ntlmv2 to Auto. this can always be over-ridden. 3) fixed reusage of ntlmssp_cli_flgs which was being a pain 4) added pwd_compare() function then fixed bug in cli_use where NULL domain name was making connections multiply unfruitfully 5) type-casting of mallocs and Reallocs that cause ansi-c compilers to bitch
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-013-105/+71
|
* this is going to sound _really_ weird, ok, but i had to implementLuke Leighton1999-11-291-3/+3
| | | | equivalents of NetUseAdd and NetUseDel!
* attempting to resolve the issue that multiple servers often specified inLuke Leighton1999-11-291-1/+2
| | | | parameters to connect to \PIPE\NETLOGON.
* first attempt at getting \PIPE\NETLOGON working. it's pretty horrible.Luke Leighton1999-11-291-96/+12
|
* updated \PIPE\wkssvc commands to use new abstracted connection system.Luke Leighton1999-11-271-8/+26
| | | | | modified resolve_srv_name() to return dest host of *SMBSERVER if server name is \\ip.add.ress.format
* modified cli_connect_serverlist to take server list of formatLuke Leighton1999-11-271-5/+6
| | | | \\server_name \\other_server etc.
* whoa. _major_ restructure of rpcclient. fixed some buuugs, created a few.Luke Leighton1999-11-261-0/+24
| | | | | | found out that getopt() _must_ have optind set to 0 before reuse. still haven't decided what to do with the net* api yet...
* previous commit added an abstraction function that didn't even haveLuke Leighton1999-11-252-8/+5
| | | | | struct cli_state, uint16 fnum into the code: rpc_hnd_api_req(). modified cli_lsarpc.c to use this. the rest is const issues.
* ok. *whew*. this is the first completed part of the restructure.Luke Leighton1999-11-242-31/+48
| | | | | | | | | | | | 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.
* first stages of removing struct cli_state* and uint16 fnum from allLuke Leighton1999-11-241-3/+4
| | | | | | | | | msrpc client code. the intent is to hide / abstract / associate connection info behind policy handles. this makes the msrpc functions look more and more like their nt equivalents. who-hou!
* implement server-side generation of NTLMv2 session key. YESSS :-)Luke Leighton1999-11-212-14/+31
|
* you know what? this sort of thing makes me laugh. hmm, what functionsLuke Leighton1999-11-213-4/+40
| | | | | | | | | | | | | | | | | | | | 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);
* The First Necessary UNICODE String Support.Luke Leighton1999-11-191-19/+67
| | | | | | | | | the random workstation trust account password is TOTAL garbage. i mean, complete garbage. it's nowhere CLOSE to being a UNICODE string. therefore we can't just take every second character. created nt_owf_genW() which creates NT#(password) instead of NT#(Unicode(pw)). followed through to the password setting in srv_samr.c
* added regqueryval command (experimental) to get reg_io_q_info() andLuke Leighton1999-11-181-1/+1
| | | | | | | | reg_io_r_info() working properly. previously they weren't well understood (well, they were the first of the registry functions i did, back in december 97, ok??? :-) set ntversion to 0x1 in SAMQUERY, so that we reply same as NT4 srv.
* experimental spoolss rpcclient commandsLuke Leighton1999-11-051-0/+6
|
* samuserset <username> -p password. YESSSSS :)Luke Leighton1999-11-041-0/+11
| | | | you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no).
* adding experimental set user password command to rpcclient, it returnsLuke Leighton1999-11-041-0/+66
| | | | error wrong password against nt. ????
* the new CAP_EXTENDED_SECURITY code needed to support NTLMv2. also removedLuke Leighton1999-10-251-1/+1
| | | | | switching on CAP_STATUS32 from non-CAP_EXTENDED_SECURITY code (enabled for test purposes only)
* one of those wonderful moments when running against a different MSRPCLuke Leighton1999-10-251-5/+13
| | | | | | implementation (NT5) when you discover that your code is trash. samr_enum_dom_users(), samr_enum_dom_aliases() and samr_enum_dom_groups() all take a HANDLE for multiple-call enumeration purposes.
* split modify_trust_account_password into a separate module.Luke Leighton1999-10-211-0/+211
|
* need status codes from cli_net_req_chal() and cli_net_auth2().Luke Leighton1999-10-191-1/+2
| | | | | | this format is what i would like _all_ these functions to be (returning status codes, not BOOL) but that's a horrendous amount of work at the moment :)
* const issuesLuke Leighton1999-10-141-1/+1
|
* adding CAP_EXTENDED_SECURITY support in a hurry last week. forgot toLuke Leighton1999-10-141-0/+29
| | | | deal with linking issues in other binaries
* - added rudimentary CAP_UNICODE support because i thought it was part ofLuke Leighton1999-10-072-70/+417
| | | | | | | | | | | | | | | | | a problem i was having. - added rudimentary CAP_STATUS32 support for same reason. - added hard-coded, copy-the-same-data-from-over-the-wire version of CAP_EXTENDED_SECURITY, which is a security-blob to encapsulate GSSAPI which encodes SPNEGO which is used to negotiate Kerberos or NTLMSSP. i have implemented NTLMSSP which negotiates NTLMv1 or NTLMv2 and 40-bit or 128-bit etc. i have implemented NTLMv1 / 40-bit. *whew*.
* reading in smb server domain name from SMBnegprot responseLuke Leighton1999-09-161-5/+26
|
* #defines for port 445 to SMB_PORT2Luke Leighton1999-09-151-2/+2
|
* debug info display (netbios layer).Luke Leighton1999-08-181-4/+12
|
* bug-fix in connection to port 445. cool! it works!Luke Leighton1999-08-031-0/+1
|
* attempting a connection to port 445 first, followed by a connection to 139Luke Leighton1999-08-031-6/+23
| | | | if this fails.
* close socket issues:Luke Leighton1999-08-031-11/+33
| | | | | - ssl close from cli_reestablish_connection() not called. - ntlmv2 fall-back to ntlmv1 failed.
* BDC support.Matthew Chapman1999-07-221-0/+13
| | | | Algorithm based on previous work of Jeremy's.
* BDC support.Luke Leighton1999-07-211-1/+5
|
* anon passwd connection: passlen=1; ntpasslen=0.Luke Leighton1999-07-111-3/+4
|
* When making anonymous connections, must pass pointers to real ntTim Potter1999-07-091-5/+5
| | | | password and password length variables not constants.
* fixed problem with NULL ntpasswd parameters causing crash inLuke Leighton1999-07-081-9/+43
| | | | | static cli_calc_session_pwds(). this code used to be inside cli_session_setup() itself and worked on non-NULL local variables.
* removed old code/comments.Luke Leighton1999-06-291-66/+0
|
* smbclient modified to use cli_establish_connection(). smbclient thereforeLuke Leighton1999-06-292-5/+22
| | | | | | now uses improved authentication. smbclient now "broken" for "scripts" based on DEBUG() output. cli_establish_connection() requires modification to support old scripts.
* improving authentication code (tidyup).Luke Leighton1999-06-293-129/+483
|
* use nmb_safe_namestr.Luke Leighton1999-06-241-3/+8
|
* safe string version of nmb_namestr.Luke Leighton1999-06-241-4/+13
|
* safe string error reporting functions (found a potential buffer overflowLuke Leighton1999-06-243-62/+93
| | | | of a pstrcpy into an fstring).