summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
AgeCommit message (Collapse)AuthorFilesLines
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-9/+7
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-06-16clientgen: Added USE_SSL for client shutdown.Jeremy Allison1-0/+3
clitar.c: Added 'Samba style' comments before string_create_s(). loadparm.c: Fixed missing comma in SSL code. util.c: Removed string_create_s(). Currently it's only called from clitar.c and having it here as well as a static in clitar causes the compile to break (Richard, please decide where you want this function). lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se> to stop coredump on missing parameter. Jeremy. (This used to be commit d23b44322570cb9a7aa2b86407bf4f91010a237b)
1998-06-16Added SSL support from Christian Starkjohann <cs@obdev.at>Jeremy Allison1-0/+13
This patch may not yet compile with -DUSE_SSL enabled, further Makefile changes may be needed. But it was important to get this code in place before I go off to USENIX. Jeremy. (This used to be commit 31e768369fdc61e07c59630c86c62239f3d3f3f7)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-29/+29
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-05-11changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1-3/+4
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
1998-04-29clientgen.c: Fixed null session setup bug.Jeremy Allison1-6/+11
password.c: Stopped cli_nt_logout call (we don't have it correct yet). Added Luke object-orientation fix :-). smb.h: Added clnt_name_slash to cli_state. lib/rpc/client/cli_login.c: Changed global_myname to clnt_name_slash where needed. lib/rpc/client/cli_netlogon.c: Fixed debug messages, don't check creds on error. lib/rpc/client/cli_pipe.c: Fixed debug messages, Added Luke object-orientation fix. lib/rpc/parse/parse_misc.c: Fixed STRING2 linearization bug that was adding 1. Jeremy. (This used to be commit c6c22df20196cb7f0ae84b1a1dd202a87adb8d4e)
1998-04-28Fixed checked in code that didn't compile.Jeremy Allison1-9/+5
Jeremy. (This used to be commit 5f258abf526243f753c3a64cde2e1f67e4d60b6b)
1998-04-28added NetShareEnum from Bartlomej Czardybon <czar@silesia.pik-net.pl>Luke Leighton1-0/+59
(This used to be commit 37cbc356741055d0660b80594117fa312d252b85)
1998-04-23Makefile: Added nterr.c into the mix.Jeremy Allison1-17/+36
clientgen.c: Added nt_error as an entry in the struct client_state. password.c: Open the netlogon pipe. smb.h: Added nt_error as an entry in the struct client_state. lib/rpc/parse/parse_net.c: Added comments on net logon. lib/rpc/server/srv_netlog.c: Added comments on net logon. Jeremy. (This used to be commit 899a9f0dce50c73e03c8da2ebe920957491c8ad7)
1998-04-23clientgen.c: Added rap error codes to cli_error, moved from smbpasswd.cJeremy Allison1-8/+63
password.c: Changed global cli -> pw_cli, removed strtok (bad strtok, bad :-) use in security=server, started to extend security=domain code. smbpasswd.c: Removed rap error code functions. Jeremy. (This used to be commit 0f00b8fce1a5cad7f8c212568fa33f09986e5bd6)
1998-04-21clientgen.c: Added cli_ulogoff() call.Jeremy Allison1-0/+19
password.c: Added call to cli_ulogoff on successfull sessionsetup. Jeremy. (This used to be commit 77882f002b2a8203aad419e485fc885303d999a0)
1998-04-20Makefile: Added genrand.oJeremy Allison1-1/+6
clientgen.c: Changed to fill change password buffer with random stuff. password.c: Changed to get challenge from genrand.c server.c: Added #ifdef around O_SYNC. version.h: Changed to 1.9.19prealpha. genrand.c: New code to generate (hopefully) good random numbers for use in crypto challenges/session keys etc. PLEASE REVIEW THIS CODE AND SUGGEST IMPROVEMENTS !!!!!! Jeremy. (This used to be commit 608e98546392fd0aac9b33f4feac43615dbb4405)
1998-04-17clientgen.c: Changes 'cli_xxx_' calls to use the followingJeremy Allison1-53/+99
regularized parameter syntax: setup, setup_count, max_setup_count, params, params_count, max_params_count, data, data_count, max_data_count, (and if a reply is needed) *reply_params, *reply_data_len *reply_data, *reply_data_len This allows the pointers and the lengths that relate to these pointers to be next to each other in the parameter list. This makes seeing what you are passing to these functions much easier to see. Getting ready for adding the lib/rpc/client functions needed to do security=domain. torture.c: Fixed it so it uses / rather than \\ internally for the //machine/share syntax. Jeremy. (This used to be commit 38350ea8b949d0908497490898ff04df7591ccac)
1998-04-12support O_SYNC in opens for smbtortureAndrew Tridgell1-0/+4
(This used to be commit 000b871839e12065fc514f857ba205590a95b040)
1998-03-24clientgen.c ipc.c smbpasswd.c: Fixes for warnings (from Herb).Jeremy Allison1-1/+1
quotas.c: Linux quota fix. util.c: Ensure smb_read_error is zero in all calls that can set it. lib/rpc/include/rpc_misc.h lib/rpc/include/rpc_netlogon.h lib/rpc/parse/parse_misc.c lib/rpc/parse/parse_net.c lib/rpc/server/srv_netlog.c : Modify Luke's code to call SamOEMhash(). Jeremy. (This used to be commit 7f749708383b8b36c3f23a5fbc5cbdf39bc8e555)
1998-03-19Adding the same changes to HEAD as were added to BRANCH_1_9_18.Jeremy Allison1-1/+99
Changed smbpasswd to be client-server for a normal user, rather than accessing the private/smbpasswd file directly (it still accesses this file directly when run as root, so root can add users/change a users password without knowing the old password). A shakeout of this change is that smbpasswd can now be used to change a users password on a remote NT machine (yep - you heard that one right - we can now change a NT password from UNIX !!!!!). Jeremy. (This used to be commit 20770b6f1c25288e90d3e0d215afa7f0809ce124)
1998-03-16Adding the same change as was added to 1.9.18 branch to add theJeremy Allison1-7/+3
"name resolve order" parameter. source/Makefile: Re-ordered link for name resolve order code. source/clientgen.c: source/clientutil.c: Added calls to resolve_name(). source/includes.h: Added HPUX zombie fix. source/loadparm.c: Added new name resolve order parameter. source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name() function requested by John. source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server. source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c source/password.c: Call resolve_name() to lookup security=server name. source/reply.c: source/time.c: source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au. source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause problems on many systems. Jeremy. (This used to be commit 7f118970da7c43eaddcf92dc056d3e849f1e7d5c)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-1/+1
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-12-20client.c:Jeremy Allison1-20/+20
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. (This used to be commit 1084fb46821cb96702da35439da4a8df9d255698)
1997-12-02add the null string to SMBsetatr callsAndrew Tridgell1-1/+3
(This used to be commit fbb2be050ded099741345a101ba13e6b12ebc823)
1997-11-30clientgen.c: Added cli_mv() (used in a recent torture test).Jeremy Allison1-0/+37
reply.c: Changed reply_open_and_X to split out the oplock request bits from core and extended and if an oplock was granted only set the corresponding bit on reply. server.c: Added code to dynamically allocate i/o buffers in oplock_break (prevents recursion problems) , also made reset of sent_oplock_break explicit. Jeremy. (This used to be commit 16e55ee2b8be9a4210d8cf87691cdf42373759d2)
1997-11-24added cli_rmdir and cli_mkdirAndrew Tridgell1-1/+65
added test in smbtorture for the server updating the directory modify time when a file is added to a directory cleanup in smbtorture so no garbage files are left on the server (This used to be commit 3a5e07f1e994396853e6340e8ef3f4d12bb0243e)
1997-11-23added a SMB_QUERY_FILE_ALL_INFO test into smbtortureAndrew Tridgell1-0/+56
W95 doesn't seem to support this call. (This used to be commit 162947c6e672580216c6223a44d25b874f0487ab)
1997-11-23added some QPATHINFO and QFILEINFO tests into smbtorture.Andrew Tridgell1-5/+111
This tests for things like midnight access times, sticky create times and word reversed INFO_STANDARD returns (This used to be commit 89141de14edf9e46ab279d2a74a9b026716a0ba8)
1997-11-23test SMBsetatr as wellAndrew Tridgell1-6/+51
(This used to be commit 2f29c24ba721e417828efca57011ed45892191a5)
1997-11-23added a test for the NT SMBgetatr bug in smbtortureAndrew Tridgell1-19/+59
added support for choosing the protocol level in smbtorture (-m option) use -1 for null date in cli_close() get the attributes right in cli_open() (This used to be commit d64d40a6ec57a4a999ae1f39175bcfd86ccb196e)
1997-11-11fixed a bug which caused nmbd to core dump. The problem was incorrectAndrew Tridgell1-2/+2
parameters to cli_NetServerEnum() (This used to be commit 628d5895aa8a6add1a76bcf2561d01881b7c8c63)
1997-11-10Rolled back tree state to 11:59pm 8th November 1997 EST toJeremy Allison1-82/+64
remove problems. Jeremy (This used to be commit 4a36ac236c2ad634f05efcd0179875d09988614a)
1997-11-09attempting to mark up 32 bit error codes, needed for NT domains.Luke Leighton1-64/+82
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*. (This used to be commit f27966957fa7f16d337a4a58719239d036deab4c)
1997-11-08added two more sets of tests to the smbtorture test. The tests I addedAndrew Tridgell1-0/+10
are ones that I know Samba fails. They are: 1) correct support for retaining locks over a close (ie. the server must not use posix semantics) 2) support for lock timeouts 3) the server supports multiple locking contexts on the one SMB connection, distinguished by PID. 4) the server correctly fails overlapping locks made by the same PID (this goes against POSIX behaviour, which is why it is tricky to implement) 5) the server denies unlock requests by an incorrect client PID I've been discussing with Jeremy ways that we can re-implement the locking code to handle these correctly. This test code will be useful to see that we have got it right. (This used to be commit 097781e2992f12c545170c82ada2f4023a9784f5)
1997-11-01a simple SMB torture tester. This will allow us to evaluate lockingAndrew Tridgell1-3/+331
techniques more accurately. (This used to be commit 054e3b2ae3a8cfb98fde72becef9b05de34d2ba7)
1997-10-26The browse synchronisation code in nmbsync.c now uses the clientgen.cAndrew Tridgell1-0/+73
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. (This used to be commit 4bf5c03b18f88b566f3ac12cc4b3a9c5c96fd35d)
1997-10-23renamed static cli_setup_pkt() to static cli_setup_packet() because itLuke Leighton1-7/+7
clashed with the currently-used cli_setup_pkt() in clientutil.c (This used to be commit 25560cf40b997e400d16fa0c1380e5bc29c015a5)
1997-10-21This is a set of generic SMB client routines. I needed this in a hurryAndrew Tridgell1-0/+673
to fix the password server code, so I didn't use SMBlib. This code is fairly generic and uses a "struct cli_state" to hold the client state. (This used to be commit 3a0b5f06f42efdb522f1c5d3d9a4b4afabe03b40)