summaryrefslogtreecommitdiff
path: root/source3/client/clientutil.c
AgeCommit message (Collapse)AuthorFilesLines
1998-10-04- modified resolve_name() to take a name_typeAndrew Tridgell1-1/+1
- cleaned up resolve_name() (split into separate functions for each resolver) - if can't find local master then use #1B name - support listing of foreign workgroups in /smb/ (This used to be commit a4e607c17d1119925c9d0e1d05e0fe81e9a2d1aa)
1998-09-29Got very strict about the differences and uses ofJeremy Allison1-9/+8
uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy. (This used to be commit e570db46fc3a78e499523fd342e9a34cebb18998)
1998-09-28Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.Jeremy Allison1-3/+18
These were the problems that still existed in the 2.0 branch. Jeremy. (This used to be commit 3fd28812f75f2311a114ff905143634e3bbb1fac)
1998-08-30allow smbclient to connect to IPC$ as an IPC serviceAndrew Tridgell1-2/+0
(This used to be commit 275679db29f2630a16cd5e9f4b5346ac834a484f)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-6/+4
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
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-06-15client.c: Made -L do a null-session share unless -U user is specified.Jeremy Allison1-94/+105
clientutil.c: Fixed NT session to add NT password. groupname.c: Added lookup function. Jeremy. (This used to be commit 8216363e83fcdccfade70f983830b56b7e6546a4)
1998-06-01clientutil.c: Don't core dump if no controlling terminal available for password.Jeremy Allison1-0/+3
passdb.c: lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping. We can change this at a later date to make more bits available if neccessary. Jeremy. (This used to be commit 34f40474aba97118e1e80fe6259c686e46dc16b4)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-21/+21
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-04-25This looks like a big change but really isn't.Jeremy Allison1-9/+9
It is changing the global variables "myname" and "myworkgroup" to "global_myname" and "global_myworkgroup" respectively. This is to make it very explicit when we are messing with a global (don't ask - it makes the domain client code much clearer :-). Jeremy. (This used to be commit 866406bfe399cf757c8275093dacd5ce4843afa0)
1998-04-13Changes to allow Samba to be compiled with -Wstrict-prototypesJeremy Allison1-1/+1
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-03-16Adding the same change as was added to 1.9.18 branch to add theJeremy Allison1-32/+2
"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-02-26-N option still prompted for password in smbclient -L usageHerb Lewis1-1/+3
(This used to be commit 140fba461bc22f26055c13b04a084d2df16ac604)
1998-02-14Sometime after 1.9.17p5 smbclient stopped being able to doJeremy Allison1-2/+4
NetBIOS name lookups by broadcast and instead only does DNS. With the belief that this was not what was intended (I think it happened in the clientutil.c cleanup) I have added that capability back to smbclient by adding the #define USENMB into clientutil.c, and adding the required namequery.o into the object lists for smbclient and smbmount (as they now need it to link). If this was done intentionally let me know and I'll back this out. Jeremy. (This used to be commit 1da47e79d3055468b03f496982af0fb836d91f8c)
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)
1998-01-16Makefile: Added new codepage - 866.Jeremy Allison1-1/+1
charset.c: Supporting code for codepage 866. clientutil.c: Fix compile bug in little-used #define. includes.h: Supporting code for codepage 866. make_smbcodepage.c: Supporting code for codepage 866. pcap.c: Fix bug for lpstat. Jeremy. (This used to be commit 6040d7a39e5d5ab426905aa79b871df815fb9b62)
1998-01-05Added 3 commands:Volker Lendecke1-27/+35
smbmount: This is a stripped down smbclient that communicates with the Linux 2.1.x kernel to supply authenticated smb connections for smbfs mount points. smbmnt/smbumount: setuid commands that do the actual smb mount system call after having done the appropriate security checks (This used to be commit ccbbc4e647ad900b215dae949d5bcd45671c68c8)
1997-12-20client.c:Jeremy Allison1-9/+9
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-14fix a bug that sometimes prevented smbclient from connecting withAndrew Tridgell1-1/+3
protocol < LANMAN1 (This used to be commit 95ad2c284dad9c5042ac113eb7067a10531d34a1)
1997-12-13This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1-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. (This used to be commit d80b0cb645f81d16734929a0b27a91c6650499bb)
1997-11-03added code that _uses_ arcfour. arcfour itself, or anything remotelyLuke Leighton1-1/+4
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). (This used to be commit 4cf4dd696714492f8e51661cab4736d66ab2916b)
1997-11-02convert the credentials code back to uchar[8] from uint32[2]Andrew Tridgell1-3/+3
This should fix the byte order problems (maybe!) (This used to be commit 21878e7d8628d05786c3c76f2943e31df1096577)
1997-11-01client.c clientutil.c proto.hLuke Leighton1-5/+8
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. (This used to be commit 54c245be152e5fa8f5b535c93f8d11c5f591e23f)
1997-11-01a simple SMB torture tester. This will allow us to evaluate lockingAndrew Tridgell1-154/+0
techniques more accurately. (This used to be commit 054e3b2ae3a8cfb98fde72becef9b05de34d2ba7)
1997-10-26fix some casting errors in smbencrypt and some multiply-defined errorsAndrew Tridgell1-1/+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) (This used to be commit 944ecbcbd47afcc20e2e408a06d57c7b8d0d86a8)
1997-10-26The browse synchronisation code in nmbsync.c now uses the clientgen.cAndrew Tridgell1-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. (This used to be commit 4bf5c03b18f88b566f3ac12cc4b3a9c5c96fd35d)
1997-10-23playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)Luke Leighton1-5/+7
and then send a LSA_REQ_CHAL down it. (This used to be commit 473f21071fad603865358821b83df6b58c9a06a5)
1997-10-22Makefile client.c clientutil.c clitar.c nmbsync.c :Luke Leighton1-241/+292
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. (This used to be commit 6ee065ce6e099acfc7e83ad399ef6e60b4c625c1)
1997-10-21some cleanups in the clientutil.c code.Andrew Tridgell1-30/+35
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 (This used to be commit 3af8d855facfc436cb4b64fa58aca8c056a5348e)
1997-10-09bracket some macrosAndrew Tridgell1-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) (This used to be commit e10ba4b97a219e87b62d32834bf15ed2e323ed2e)
1997-10-04a bit of bounds checkingAndrew Tridgell1-0/+12
(This used to be commit d40199f4fe1344058267859820cb36b77a20442a)
1997-09-26Adding Andrews buffer overflow fixes into the main branch.Jeremy Allison1-10/+11
Jeremy (jallison@whistle.com) (This used to be commit e7eb1f044d3101679dc7a118820ea5efe0cd837c)
1997-09-14This commit does 3 main things:Andrew Tridgell1-6/+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. (This used to be commit db917c62c14315afe6f0745a8097c1bca25cbf07)
1997-08-28includes.h: Make sure REPLACE_GETPASS are wrapped with #ifdefs.Jeremy Allison1-0/+6
nmbsync.c: Make sure REPLACE_GETPASS is defined before including includes.h clientutil.c: Catch null passwords. Fixes for a nmbd crash bug found by Herb Lewis @ SGI. Jermey(jallison@whistle.com) (This used to be commit 45c266baaea8755f1a3c0c4c7a87eb0752848ca2)
1997-07-30client.c: Minor change to cast parameters for DEC unix.Samba Release Account1-2/+2
clientutil.c: Minor change to cast parameters for DEC unix. ipc.c: Fixes to parameterise the stuff John wants. loadparm.c: Fixes to parameterise the stuff John wants. nameannounce.c: Fixes to parameterise the stuff John wants. namedbwork.c: Fixes to parameterise the stuff John wants. nameserv.h: Fixes to parameterise the stuff John wants. proto.h: Fixes to parameterise the stuff John wants. smb.h: Fixes to parameterise the stuff John wants. util.c: tidy. Jeremy (jallison@whistle.com) (This used to be commit 9fbca2594ba775450d5dca13cbce257b4362ca66)
1997-05-08'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)Samba Release Account1-1/+1
Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1. (This used to be commit cf23a155a1315f50d488794a2caf88402bf3e3e6)
1996-08-22- add timeouts to connect() for password server connections. ThisAndrew Tridgell1-2/+2
makes multiple password servers practical. (This used to be commit 5c3e8326cc45d3cbd076475e445ce461a2bf7560)
1996-08-19- added "netbios name" option in smb.conf to make controlling the nameAndrew Tridgell1-5/+3
that samba uses possible - added "socket address" option to allow virtual SMB servers (on systems with IP aliasing line Linux) - disabled FAST_SHARE_MODES by default in Linux as older Linux boxes can't do shared writeable mappings. We really need autoconf ... - added new option types in loadparm so a string type can be specified ot be uppercase only, this is used for the workgroup and netbios name options - auto-create the lock directory if it doesn't exist in shared mem startup - get rid of announce_backup() - change a few comments in nmbd code - rewrote the chaining code completely. Hopefully it will handle any depth chains now. - added LPRng support (This used to be commit e9eac6cd49c352349580ddb13d720cb201aecc48)
1996-06-05- changed some debug levels in clientutil.cAndrew Tridgell1-18/+18
- added dir_check_ftype() to clean up the file type checking a bit - added check for libc version >= 5 for setfsuid() for Linux - moved the AM_MASTER() and related macros to nameserv.h - added proper defines for the various netbios announce types - don't call the announce_backup() code, as I'm pretty sure its wrong it sent ANN_GetBackupListReq packets as broadcasts, they are supposed to be used only by clients to the master browser to find a list of available backup servers to remote a netserverenum to, I don't think nmbd should ever send one. - fixed a bug in the browse list writing - minor debug cleanups - put in the code to discard our own broadcasts (it won't work for multi-homed hosts though) - changed ELECTION_VERSION to 1 so we can be beaten by a NT 3.51 server by lowering the os level. - only do sync_browse_lists() if we are the master browser, otherwise we'll cause network overload - don't call tell_become_backup() as it appears to be badly broken, it should only be used when the machine being told has its MAINTAIN_LIST to to auto. Not calling it does no great harm anyway - fix a nasty bug where becomebackup was confused with reset browser! - make setbuffer() not get caught by the auto protototypes (This used to be commit cfbad9b08242962f41595273de08a7293fe432b1)
1996-06-04a huge pile of changes :-)Andrew Tridgell1-0/+1029
The biggest thing is the integration of Lukes new nmbd. Its still largely untested, so we will really need some feedback I've also added auto prototype generation and cleaned up a lot of minor things as a result (This used to be commit 0d8dcfa13c527ec2c8aca39ba49c09e4e694b26c)