summaryrefslogtreecommitdiffstats
path: root/source/client
Commit message (Collapse)AuthorAgeFilesLines
...
* Bugfix from Branko Cibej <branko.cibej@hermes.si>Jeremy Allison1997-12-241-1/+1
| | | | | | - client.c had a workaround embedded in it for his earlier bug in StrnCaseCmp - removed this. Jeremy.
* client.c:Jeremy Allison1997-12-203-45/+50
| | | | | | | | | | | | | | | | clientgen.c: clientutil.c: clitar.c: Changed usage of receive_smb to new function client_receive_smb except for one use of receive_smb in client.c. This is the receive_smb used to discard packets received whilst in a keyboard wait state. util.c: Created new function client_receive_smb that ignores session keepalives just as the old receive_smb used to do. Created internal function read_smb_length_return_keepalive that is used internally by the changed receive_smb call. Changed read_smb_len to not use an internal buffer - it is never called with a null buffer so such code is redundant. Jeremy.
* fix a bug that sometimes prevented smbclient from connecting withAndrew Tridgell1997-12-141-1/+3
| | | | protocol < LANMAN1
* This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-4/+7
| | | | | | | | back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy.
* fixed the help message for -p (someone complained!)Andrew Tridgell1997-12-021-1/+1
|
* get rid of stat command (it is a hangover from an old experiment)Andrew Tridgell1997-11-251-38/+0
|
* added true enumerated types in loadparm.c. Now we don't need all thoseAndrew Tridgell1997-11-221-8/+2
| | | | | | | | | | | | | | | | "interpret_security" and similar functions. This also means that testparm produces string values for these enumerated types rather than an integer. This was done to make the web interface much cleaner. While I was doing this I found a couple of very nasty bugs in the parm_table code. Someone had added a handle_character_set() function that treated the char** pointer for a P_STRING as an integer! This would have caused memory corruption for anyone using the "character set" option. The loadparm code is delicate - please be careful about using it's more esoteric features! I've also removed the "coding system" global and made it a P_STRING. The integer value was never used anywhere in Samba.
* Rolled back tree state to 11:59pm 8th November 1997 EST toJeremy Allison1997-11-102-174/+42
| | | | | remove problems. Jeremy
* byteorder.h :Luke Leighton1997-11-091-43/+72
| | | | | | | | | | | | typecasting for the debug messages of the data dump. hm. #ifdef NTDOMAIN ntclient.c rpc_pipes/lsaparse.c rpc_pipes/ntclientnet.c rpc_pipes/smbparse.c : adding "Net Server Password Set" functionality to smbclient. #endif
* attempting to mark up 32 bit error codes, needed for NT domains.Luke Leighton1997-11-092-13/+116
| | | | | | | | | | | | separated out smb server-mode password validation into a separate file. added called and calling netbios names to client gen state: referenced section in rfc1002.txt. created workstation trust account checking code in ntclient.c there might be a bug in reply_session_setup_andX. i indented and added { } around single-line if statements: the lm password checking code now doesn't look right (around the GUEST_SESSSETUP bits). *no code semantics have been changed by the indentation process*.
* added code that _uses_ arcfour. arcfour itself, or anything remotelyLuke Leighton1997-11-032-4/+24
| | | | | | | like it, has *not* been added. this is the client and server side of the SAM Logon NT and LM OWF password obfuscation (rc4 with the long-term session key).
* convert the credentials code back to uchar[8] from uint32[2]Andrew Tridgell1997-11-022-6/+6
| | | | This should fix the byte order problems (maybe!)
* client.c clientutil.c proto.hLuke Leighton1997-11-013-26/+29
| | | | | | | | | | | | | | | | | rpc_pipes/ntclientlsa.c rpc_pipes/ntclientnet.c rpc_pipes/ntclientpipe.c : added extra argument to cli_call_api() to allow specifying the length of the \PIPE\ name. it appears that, like when the name of the pipe is NULL and OS-2 requires two extra bytes _after_ the NULL name, that NT requires two bytes after the NULL-terminated name "\PIPE\". these two bytes vary, but values seen so far are: 0x72 0x70; 0x63 0x65; 0x44 0x65; 0x4E 0x00. there appears not to be much logic to this. purpose unknown. ntclient.c: put Set Named Pipe Handle State call directly after SMBopenX call.
* a simple SMB torture tester. This will allow us to evaluate lockingAndrew Tridgell1997-11-012-155/+1
| | | | techniques more accurately.
* added a client-side "set named pipe handle state" function. not knownLuke Leighton1997-10-301-4/+18
| | | | | exactly when you call this (before or after a bind). can sort that out later.
* removed mechanism that created actual files NETLOGON, lsarpc and the like,Luke Leighton1997-10-301-1/+1
| | | | | | | | which are pipes on the IPC$ connection. created mechanism to record pipe names in a separate pipes_struct. it is planned to expand this, to return sensible things like interface structures, and policy handles (RPC_IFACE and LSA_POL_HND). and the like.
* split ntclient.c down into appropriate modules.Luke Leighton1997-10-291-975/+38
|
* added frag field to make_rpc_hdr() functionLuke Leighton1997-10-291-1/+1
|
* byteorder.h :Luke Leighton1997-10-291-0/+141
| | | | | | | | | | | | | | | | | | | | added mode for printing debug array data as chars not uint8/16/32s. only really useful for (uint8) strings or (uint16) unicode strings lsaparse.c smbparse.c smb.h : rpc bind and rpc bind ack structures and parsing and creation functions. ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c : using rpc bind / bind ack parsing routines instead of incorrect use of api_LsarpcTNP1 function. ntclient.c : creation of do_rpc_bind() function. THAT'S IT, FOLKS!
* smb.h smbparse.c pipeutil.c :Luke Leighton1997-10-281-56/+56
| | | | | | | | | added bind and bind ack structures and parsing functions. restructured rpc header stuff. ntclient.c pipenetlog.c pipentlsa.c pipesrvsvc.c : having to deal with restructuring above.
* added LSA_Q_CLOSE and LSA_R_CLOSE (also to smb.h). implemented in smbclient.Luke Leighton1997-10-271-11/+193
| | | | | | | updated Query Info Policy to report domain name and domain sid for info levels 3 and 5. fixed bug in dom_sid_to_string (idauths decoded wrong). fixed bug in DOM_SID: subauths are 32 bit not 16.
* Fixed ntclient.c so it would compile.Jeremy Allison1997-10-271-1/+1
| | | | Jeremy.
* added LSA Query Info Policy.Luke Leighton1997-10-271-11/+116
| | | | | fixed a problem with byte ordering (doing an SIVAL of the setup parameters which was _also_ being done in the creation of the SMB header. oops).
* added LSA Open Policy query and response processing to smbclientLuke Leighton1997-10-271-0/+129
|
* hooray. hooray some more. hooray a lot. got the client-side working.Luke Leighton1997-10-261-53/+177
| | | | | | | | Q/R LSA_REQ_CHAL; Q/R LSA_AUTH2; Q/R LSA_SAMLOGON; Q/R LSA_SAMLOGOFF. the last (non-essential right now) bit is the LSA_SRV_PWSET. the next stage is to do LSA_OPENPOLICY; add the pipe binds (missing right now); then we can test against an NT Server.
* fix some casting errors in smbencrypt and some multiply-defined errorsAndrew Tridgell1997-10-262-2/+1
| | | | | | in clientutil.c (Luke, you can't just copy a global variable declaration from one file to another, you need to declare one of them extern)
* The browse synchronisation code in nmbsync.c now uses the clientgen.cAndrew Tridgell1997-10-261-4/+5
| | | | | | | | | | | | code, which means we don't have to link with a fake getpass routine and we don't have a whole pile of global variables that really have nothing to do with nmbd and were there to keep the client code happy. The code should function identically to what it did before (hopefully it was correct) The only thing that now uses the horrible clientutil.c code is smbclient.
* added correct client-side credential generation / checking to the LSA SAMLuke Leighton1997-10-251-42/+80
| | | | | Logon query. i think i even got the client-side checking of the response credentials right!
* got the SAM logon request generated, and received a SAM logon response back.Luke Leighton1997-10-251-2/+147
| | | | | | | | | YEAH! need to add: - client-side credential calculation - client-side parsing of the SAM logon response.
* Makefile :Luke Leighton1997-10-252-60/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding bits for new nt domain code byteorder.h : trying to get macros right, and not to crash on SUNOS5... client.c : added #ifdef NTDOMAIN, and created do_nt_login() function. don't want to have to recompile client.c unless absolutely necessary. credentials.c : moved deal_with_creds() [possibly inappropriately] into credentials.c ipc.c reply.c server.c uid.c : attempting to make (un)become_root() functions calleable from smbclient. this is a little tricky: smbclient might have to be another setuid root program, immediately setuid'ing to non-root, so that we can reset-uid to root to get at the smbpasswd file. or, have a secure pipe mechanism to smbd to grab smbpasswd entries. or the like. smbdes.c smbencrypt.c : created a function to generate lm and nt owf hashes. lsaparse.c ntclient.c smbparse.c : added nt client LSA_AUTH2 code. it works, too! pipenetlog.c pipentlsa.c pipesrvsvc.c : simplification. code-shuffling. getting that damn offset right for the opcode in RPC_HDR. smb.h : changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL. we might need to store the server times as well. proto.h : the usual.
* nterr.c :Luke Leighton1997-10-242-164/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | added a structure that wraps nt errors as strings and enums, so we can do a smb_nt_error() function. Makefile ntclient.c : added ntclient.c, broken out nt domain stuff into a separate file. getting fed up of compile-times and size of client.c. fixed the do_lsa_req_chal() function. made it read the response, and return the challenge credentials received from the server. next stop: do_lsa_auth_2(). client.c : removed nt domain logon functions into a separate file. pipenetlog.c pipentlsa.c pipesrvsvc.c smbparse.c : i'd broken the offsets of the RPC_HDR while trying to sort out the nt client code. fixed it again. added some robustness stuff. util.c : the unistrn2() function was null-terminating the string at one character too many.
* missed nmbsync.c when adding setup count and setup pointer arguments toLuke Leighton1997-10-231-9/+14
| | | | | | | | | | cli_call_api(). sorting this for jeremy. there is a discrepancy between the client.c list_servers() and the nmbsync.c add_info() calls to cli_call_api() - one has an mdrcount of 1024, the other of zero. i don't know what difference this makes.
* general sorting out, from crashes generated by do_lsa_req_chal() in client.cLuke Leighton1997-10-231-40/+48
| | | | | | | | | | | trying to set up the data parameters etc and not understanding what's going on. in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received (and in this instance, generated by do_lsa_req_chal()). and then noticed that it's two bytes out. but i don't know how to do "byte parameters" and it's not the same format as the LSA_REQCHAL received from nt workstations. agh!
* playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)Luke Leighton1997-10-232-42/+138
| | | | and then send a LSA_REQ_CHAL down it.
* client.c :Luke Leighton1997-10-221-2/+2
| | | | | | | | send to \PIPE\ not \PIPE\NETLOGON. ipc.c : fstring name not being bzero'd caused problems when calling named_pipe().
* Makefile client.c :Luke Leighton1997-10-221-2/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding start of undocumented options to do NT domain logons, client-side. starting with LSA_REQCHAL. the code here happily crashes smbd: i'll investigate this further... :-) smbparse.c pipeutil.c lsaparse.c : moved some of the common make_xxxx() functions out of pipeutil.c so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit together. makes sense, really... added a make_q_req_chal() function. restructured make_rpc_reply() and called it make_rpc_hdr(). created functions create_rpc_reply() and create_rpc_response(). pipenetlog.c pipentlsa.c pipesrvsvc.c calling new create_rpc_reply() function instead of old make_rpc_reply(). proto.h : usual. smb.h: added enum for RPC_PACKET_TYPE
* Makefile client.c clientutil.c clitar.c nmbsync.c :Luke Leighton1997-10-223-1358/+378
| | | | | | | | | | | | | | | | | | | | | redid the split that i did a year ago, taking the functions in client.c out into clientutil.c. guess what? we could now do encrypted password NetServerEnum2 calls in nmbd, if we wanted to. i can now use cli_call_api() to send to different pipes. i hope. pipenetlog.c: allow adding to users group _and_ to admin group. if adding to guest group, don't allow adding to users or admin as well. smb.h : added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...) proto.h : usual.
* some cleanups in the clientutil.c code.Andrew Tridgell1997-10-212-32/+46
| | | | | | | I'm actually hoping to remove this module completely once we convert nmbd to using the new (much cleaner) clientgen.c smbclient now also reports if it connects as a guest user
* add ERRDOS/67 ERRnosuchshare to the client.c list of error stringsAndrew Tridgell1997-10-161-0/+1
|
* bracket some macrosAndrew Tridgell1997-10-091-1/+1
| | | | | | | | change MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some systems add #ifdef around soft link dependent code (for systems that don't have soft links)
* client.c: Changed shadowed variable.Jeremy Allison1997-10-061-4/+4
| | | | | | | | | | | | | locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com)
* a bit of bounds checkingAndrew Tridgell1997-10-041-0/+12
|
* a little hack to smbclient to support extracting NT error codesAndrew Tridgell1997-10-041-0/+12
|
* Adding Andrews buffer overflow fixes into the main branch.Jeremy Allison1997-09-261-10/+11
| | | | Jeremy (jallison@whistle.com)
* add error string reporting to clitarAndrew Tridgell1997-09-261-3/+4
|
* Makefile: Changed proto: target to not include c files not used currently.Jeremy Allison1997-09-191-2/+20
| | | | | | | | | | | Caused proto.h to be from a sorted list of C files. arcfour.h: Added prototypes. client.c: Added username%password in environment patch from John Blair <jdblair@frodo.tucc.uab.edu> loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] mkproto.awk: Added arc4_key type. proto.h: Updated & sorted. Jeremy (jallison@whistle.com)
* John asked the other day about using the tar feature in smbclient toAndrew Tridgell1997-09-181-6/+22
| | | | | | | | | | | | handle file paths longer than 100 characters (the limit of the normal tar format). This patch adds support for producing GNU tar files (which have no real limit on the path length) in smbclient. Note that I have only added support for producing GNU tar files, I haven't added support for accepting them when restoring. I thought I'd leave that up to John :-)
* This commit does 3 main things:Andrew Tridgell1997-09-142-12/+0
| | | | | | | | | | | | | | | | | | | | | | | 1) put the encryption code in by default, with no #ifdef. It is still disabled by default so you need to add "encrypt passwords = yes" in smb.conf but at least all binaries will have it. 2) cleanup the kanji code so it compiles with no warnings 3) get rid of lots of uses of ugly non-portable C code. The main offender being things like "register" but also remove uses of the "const" keyword as there are compilers out there that don't support it and even those that do often complain about its usage. Users don't like warnings :-( There is still some work to do. We need to replace the md4 code with our own implementation. The current code (from rfc1186) is PD but is not very portable. The new RFC (rfc1320) is more portable but adds copyright restrictions. I'll do a from-scratch MD4 soon. We also need to test that what I've implemented is portable. It should be, but I'm too tired right now to test it on anything other than intel linux.
* charcnv.c client.c clitar.c kanji.c kanji.h loadparm.cJeremy Allison1997-09-112-59/+73
| | | | | | | | | | | | | | mangle.c smb.h util.c: Big merge to allow KANJI support to be in the main binary without explicitly compiling with it. locking.c: Fix for smbstatus not being able to read files. namepacket.c: Removed unneccesary debug statement. trans2.c: Added Luke's proposed fix (ifdefed out until further testing). nmblookup.c: Fixed bug where query fails and status is done on bogus IP. Jeremy (jallison@whistle.com)
* client.c: Made sure myhostname was initialised before substitutions.Jeremy Allison1997-09-051-0/+6
| | | | | | | status.c: Made sure myhostname was initialised before substitutions. server.c trans2.c: Moved OS/2 WPS fix. Jeremy (jallison@whistle.com)