summaryrefslogtreecommitdiff
path: root/source3/client/client.c
AgeCommit message (Collapse)AuthorFilesLines
1998-11-09Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.Jeremy Allison1-21/+7
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. (This used to be commit bacd3e9d2036a804e73644a28fc498f229c8446c)
1998-11-09converted smbclient to use clientgen.c rather than clientutil.cAndrew Tridgell1-3454/+1437
I did this when I saw yet another bug report complaining about smbclient intermittently missing files. Rather than applying more patches to smbclient it was better to move to the more robust clientgen.c code. The conversion wasn't perfect, I probably lost some features of smbclient while doing it, but at least smbclient should be consistent now. It if fails it should _always_ fail rather than giving people the false impression of a reliable utility. the tar stuff seems to work, but hasn't had much testing as I never use it myself. I'm sure someone will find bugs in my conversion of smbtar.c. It was quite tricky as it did a lot of its own SMB calls. It now uses clientgen.c exclusively. smbclient is still quite messy, but at least it doesn't build its own SMB packets. I haven't touched smbmount as I never use it. Mike, do you want to convert smbmount to use clientgen.c? (This used to be commit e14ca7765ace1b721dad8eca4a527a4e4a8f1ab8)
1998-11-02client/client.c: Patch to tidy up file size output.Jeremy Allison1-1/+1
nmbd/nmbd.c: Someone (a "yank" no doubt :-) Changed instances of "initialise" to "initialize". Someone get that man an *English* dictionary.... :-) :-). Jeremy. (This used to be commit 6279be7f96802bb132e5e18dd8c6912652296e70)
1998-10-29Tidied up option processing in smbclient - usage message now actuallyJeremy Allison1-123/+132
reflects the real options. Removed '-S' option - couldn't see what this was doing (seemed to have something to do with nt_domain_logon ?). Luke please check if you needed this code (code is only #ifdef'ed out and can be re-instated). Did this to make writing of yodl smbclient man page possible :-). Jeremy. (This used to be commit 97a14db75634b09dd272e9f59bc39c2b1eb52544)
1998-10-24fix for John.Andrew Tridgell1-8/+8
don't seek unless absolutely necessary on files in do_put() (This used to be commit 9d33d405cdbd9ae61fb68b6f5ce5f56f86cc54bb)
1998-10-24Unlink zero length files that did NOT exist at the point of origin on a ↵John Terpstra1-1/+4
do_get() call. (This used to be commit 98ba0b3a0a5074cf2b7adba407c5fd46f63c3f27)
1998-10-16use the username GUEST if no other username is availableAndrew Tridgell1-0/+5
(This used to be commit 59d99ad76cb2aa0f24467ed0df12d5ad50abff18)
1998-10-08fixed a bug in the readline supportAndrew Tridgell1-3/+4
(This used to be commit b0a69622509b450cb7724735c51d4b7173beac73)
1998-10-07somehow "in_client" got included twice in two places.Andrew Tridgell1-1/+0
(This used to be commit 378290bfe1dc4965679495aab58be55e81ecf192)
1998-10-06Added capability for smbclient to use the local WINS server on the sameRichard Sharpe1-1/+2
machine if WINSsupport configured (This used to be commit 1398feebbcb65a9e78b7084811bf9727b6d89682)
1998-10-04support using #xx at end of netbios name to connect to the specified name typeAndrew Tridgell1-0/+6
(This used to be commit bf409a40e21e44ec653d4d8fd34b52d0e7b64aed)
1998-10-04Added E Jay Berkenbilt's fixesRichard Sharpe1-2/+2
(This used to be commit fcdc9bc2089822b02b30cd55054a60ed4e696e70)
1998-09-29Got very strict about the differences and uses ofJeremy Allison1-31/+30
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-29Now have a better solution to the need to have smblcient findRichard Sharpe1-0/+3
a WINS server if running on the WINS server. As suggested by Andrew, we have a flag, in_client=False by default, and set it to True in the client. loadparam.c checks this and sets szWINSserver to 127.0.0.1 when in_client && bWINSsupport. BTW, we seem to have picked up and unused value in some of Luke's new code. (This used to be commit b665756bfc813b229ad50b0d5f53e8b779537a3f)
1998-09-29Fixed stupid bug with "cd /" appending a "/" character to the path forever....Jeremy Allison1-0/+2
Jeremy. (This used to be commit 14ee57f336100634993e7968ba54a441ac2813db)
1998-09-28Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1-13/+12
Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
1998-09-27wait_keyboard must still be defined if readline is not availableAlexandre Oliva1-3/+3
(This used to be commit dc21f6c98267afef116a449468129c1d3a8e996b)
1998-09-27Fixed up more possibly uninitialized variables.Richard Sharpe1-3/+3
Now only two compilation warnings seem to be left. Luke may want to check the changes I made. (This used to be commit 2456c95c1664a57aa939695c884ec666ec8168ec)
1998-09-23Fixed up warnings in new client code.Jeremy Allison1-43/+43
Note to coders. If using gcc please use the compiler flags : -Wall -Werror -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual *before* checking anything in to ensure a clean compile. Jeremy. (This used to be commit 1daf424da6c5a346f672121d4b6fe5753250f464)
1998-09-21implemented du and tar -nAlexandre Oliva1-2/+98
(This used to be commit 23484508a86a59a71e54a1bcac3766ec3858142a)
1998-09-18Adding rewritten restore code ... Old code is still thereRichard Sharpe1-17/+237
surrounded by a OLD_DOTARPUT. (This used to be commit 00ba54d4ee9ad875c5cfbee09d4b745df5f116ab)
1998-09-11Ok so with this bugfix 64 bit file access actually seems to work :-).Jeremy Allison1-1/+1
Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !). Jeremy. (This used to be commit 54dd51176fbab18af0b21bdee71b53f8f86573a8)
1998-09-05ahh, the joy of deleting large chunks of code that someone else hasAndrew Tridgell1-25/+0
painstakingly put in :) This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around DEBUG() statements. We just use %.0f in all cases. Makes the code a bit easier to read :) (This used to be commit 41f0069afc02169932e04ff0039bb6328eaaf04d)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-6/+14
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-09-03Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1-0/+23
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison1-7/+7
bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
1998-08-31bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1-24/+25
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
1998-08-28This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison1-1/+1
correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy. (This used to be commit 779b924ec1f6c81ff578d22295b20fece698d1fc)
1998-08-14remove an unused variableAndrew Tridgell1-1/+0
(This used to be commit 6f9228b01131d0fad464971297393ccb8a15703f)
1998-08-12I've added a dbgflush() function to debug.c. Calling this will cause theChristopher R. Hertel1-1/+1
debug format buffer to be written out (and reset). fflush() is also called to force the issue. I replaced the call to fflush() in client.c with a call to dbgflush(), which seems to have fixed the problem that Andrew was working on (i.e., that the prompt was not displayed when using smbclient). Chris -)----- (This used to be commit a97460869fe1448be5132fdab586d30872d21a69)
1998-08-11Makefile.in: Added CHECK target back in (at Herb's request). AddedJeremy Allison1-11/+28
manpath in (although we don't currently use it). client/client.c: Added John Blair's fixes for "put -". include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code. smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug. Jeremy. (This used to be commit 4ac3091e57e9ab234b3c051333ba521a92defa99)
1998-07-31As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel1-1/+1
timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)----- (This used to be commit 60286ccecaa6028d687e6406755016455e3b3a26)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-68/+2
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-06-16Added SSL support from Christian Starkjohann <cs@obdev.at>Jeremy Allison1-0/+4
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-36/+30
clientutil.c: Fixed NT session to add NT password. groupname.c: Added lookup function. Jeremy. (This used to be commit 8216363e83fcdccfade70f983830b56b7e6546a4)
1998-06-04client.c: Allowed client to proceed even if it gets error 234 (more dataJeremy Allison1-101/+108
available) when scanning server/workgroup/share lists. ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have ERRmoredata in smb.h Jeremy. (This used to be commit ae3510e9fb309be343e245d8460c1ceb8164077b)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-156/+156
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-11don't use system functions as arguments to qsort() as otherwise youAndrew Tridgell1-1/+1
get stuck on systems with broken headers (like SunOS4). In this case use StrCaseCmp instead of strcasecmp (This used to be commit 1386c6e25a2cf05c5c48b7a5094db3b2a6f5a5b3)
1998-05-11changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1-11/+23
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-25This looks like a big change but really isn't.Jeremy Allison1-4/+4
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-27/+25
with gcc. (Not a big change although it looks like it :-). Jeremy. (This used to be commit cd2613c57261456485fe4eeecfda209ada70de8e)
1998-04-11Changes to client.c support the need for directories to be processed by whateverRichard Sharpe1-16/+24
action is passed to do_dir. Changes to clitar.c as requested by Canon Information Systems Research Australia: 1. Support restoring long file names 2. Write directory entries to TAR files as first part of setting directory create times 3. Ensure zero length files get correct mtime 4. Allow DOS and UNIX pathnames in command line parameters. (This used to be commit 0c228f0b33950c8d38de0529e88a38848742a50d)
1998-03-26client.c: Fixed problem where debug level on command line was overridden by ↵Jeremy Allison1-2/+11
smb.conf. smbpasswd.c: Removed bugs I put in yesterday (thanks Luke :-) and added error message reporting for remote password changing. Jeremy. (This used to be commit 6a3394a285a250d1029cdd545dd0bf832284555a)
1998-03-19Adding the same changes to HEAD as were added to BRANCH_1_9_18.Jeremy Allison1-25/+0
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-1/+11
"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-03-14another makeover of loadparm to support new stuff in swat andAndrew Tridgell1-1/+1
testparm. In particular I added: - ability to optionally save default values of all parameters when calling lp_load(). This can then be used to save only non-default parameters in lp_dump(). This makes the saved smb.conf (and viewed parameters in testparm) much shorter - ability to not load ipc share in lp_load() - separators in parm_table[] so parameters can be grouped logically. - flag to mark parameters that are local but which should be also viewed as global as far as parameters editing is concerned (This used to be commit f9af35da26e58fb0b644b5f0169f1c212230047a)
1998-03-03Change the multibyte character set support so thatJeremy Allison1-16/+3
Kanji support is one case of multibyte character support, rather than being a specific case in single byte character support. This allows us to add Big5 Chinese support (code page 950) and Korean Hangul support (code page 949) at very little cost. Also allows us to easily add future multibyte code pages. Makefile: Added codepages 949, 950 as we now support more multibyte codepages. asyncdns.c: Fixed problem with child being re-spawned when parent killed. charcnv.c charset.c client.c clitar.c kanji.c kanji.h smb.h util.c loadparm.c: Generic multibyte codepage support (adding Big5 Chinese and Korean Hangul). nmbd.c: Fixed problem with child being re-spawned when parent killed. mangle.c: Modified str_checksum so that first 15 characters have more effect on outcome. This helps with short name mangling as most 'long' names are still shorter than 15 chars (bug was foobar_mng and foobar_sum would hash to the same value, with the modified code they hash differently. Jeremy. (This used to be commit 299016338cfb47f0c585875ef9b468121fcee97d)
1998-02-26-N option still prompted for password in smbclient -L usageHerb Lewis1-0/+2
(This used to be commit 140fba461bc22f26055c13b04a084d2df16ac604)
1998-02-12Added fix for doing pq command (from "James J. Szinger" ↵Jeremy Allison1-2/+2
<james.szinger@yale.edu>). Jeremy. (This used to be commit 7123405d6351cf6457adb1199dab3c6416bf9865)
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)