summaryrefslogtreecommitdiffstats
path: root/source/client/clitar.c
Commit message (Collapse)AuthorAgeFilesLines
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-301-2/+2
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-4/+4
| | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy.
* cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.Andrew Tridgell2000-01-081-1/+1
| | | | | | After fixing that I needed to use O_RDWR instead of O_WRONLY in several places to avoid the silly bug in MS servers that doesn't allow getattrE on a file opened with O_WRONLY
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-32/+60
|
* declare ttarf as double, as in client.cAlexandre Oliva1999-03-301-1/+1
|
* use double instead of SMB_BIG_UINT for dir_total and ttarfAlexandre Oliva1999-03-301-1/+1
| | | | (by tridge, merged from branch)
* * client/client.c (dir_total): use SMB_BIG_UINTAlexandre Oliva1999-03-251-2/+3
| | | | | | * client/clitar.c (ttarf): ditto * * lib/snprintf.c: support long longs; adapted from Cloyce D. Spradling's patch <cloyce@headgear.org>
* %s not $sLuke Leighton1999-02-031-1/+1
|
* A small change to clitar.c (really, I promise :-)Richard Sharpe1999-01-171-0/+7
| | | | | | | If we are writing the tar file to stdout, set dbf to stderr so that we do not screw up tar output with log info etc. Compiles clean and tested with 38MB backup. Honest :-)
* Fixed problems in debug code because I did not compileRichard Sharpe1998-12-191-4/+4
| | | | first :-(
* Added some debugging to clitar ...Richard Sharpe1998-12-191-0/+4
|
* Fixed tar recurse bug.Jeremy Allison1998-12-171-1/+1
| | | | Jeremy.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-3/+3
| | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy.
* fixed setmode in smbclientAndrew Tridgell1998-11-141-7/+6
|
* - handle servers that don't support getattrE (ie. NT)Andrew Tridgell1998-11-141-1/+1
| | | | - use * in clitar instead of *.*
* Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1998-11-131-1/+1
| | | | | | | | | | | | | | UNIXWARE. groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
* Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.Jeremy Allison1998-11-091-8/+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.
* converted smbclient to use clientgen.c rather than clientutil.cAndrew Tridgell1998-11-091-1137/+112
| | | | | | | | | | | | | | | | | | | | | | | 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?
* fixed a cast warningAndrew Tridgell1998-10-051-1/+1
|
* Added E Jay Berkenbilt's fixesRichard Sharpe1998-10-041-0/+3
|
* Fixed extern definition of cnum in clitar.cJeremy Allison1998-09-291-1/+1
| | | | Jeremy
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-1/+1
| | | | | | | | | | 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.
* Small update to clitar.c to omit warnings about servers notRichard Sharpe1998-09-261-4/+5
| | | | | | letting us change the date unless tar_real_noisy is True. Also updated a few places where variables are declared but not set.
* Added a minor fix to clitar.c for a bug.Richard Sharpe1998-09-241-16/+2
| | | | | | | Could not check that it compiles clean with Jeremy's -Wflags because someone loaded some changes to reply.c that break in the locking area :-(
* Fixed data corruption bugs in clitar.c with restores.Richard Sharpe1998-09-231-17/+58
| | | | | | | | | | | Have tested against samba with clitar using a hard-coded max_xmit of 2920, since max smit = 2920 does not seem to work in the smb.conf file. Will have to test correctly against Win95 and WinNT now. Have also compiled with -WJeremy'sFlags and get no more warnings after I removed an unused variable.
* Fixed up warnings in new client code.Jeremy Allison1998-09-231-4/+4
| | | | | | | 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.
* implemented du and tar -nAlexandre Oliva1998-09-211-3/+43
|
* Fixed changes in clitar.c that Jeremey noted. One change wasRichard Sharpe1998-09-191-1/+2
| | | | | | correct, the other needed slightly changing. Now to test it is all OK :-)
* Fixed compile errors in new code.Jeremy Allison1998-09-181-3/+3
| | | | Jeremy.
* Adding rewritten restore code ... Old code is still thereRichard Sharpe1998-09-181-52/+234
| | | | surrounded by a OLD_DOTARPUT.
* Ok so with this bugfix 64 bit file access actually seems to work :-).Jeremy Allison1998-09-111-1/+1
| | | | | | Problems were just dumb bugs like (defining sys_lseek to return 'int' DOH !). Jeremy.
* tridge the destroyer returns!Andrew Tridgell1998-09-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | 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?
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-3/+3
| | | | | | | | | | | | | | | | | | | | | 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.
* bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell1998-08-311-5/+5
|
* configure: Changes for extra headers.Jeremy Allison1998-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-8/+10
| | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep.
* Fixing clitar.c so that tar to stdout works correctly.Richard Sharpe1998-08-031-9/+9
| | | | | | | | | | Replaced printfs with DEBUG(0. Tested ... Works. Hope I didn't disturb the autoconf code ... It feels great to be able to run configure for Samba at long last! Regards Richard Sharpe
* clitar.c: Fixed gcc warning with comment in /* */ code.Jeremy Allison1998-06-251-1/+1
| | | | | | | nmbd_winsserver.c: Remember to free packet in multi-homed register code. Use correct query_name_from_wins_server call instead of query_name call in multihomed code. Jeremy.
* Arrrgh, one more fix. Restores of long file names wereRichard Sharpe1998-06-221-2/+7
| | | | | | | | | | broken ... Added a bzero of the buffer the names went into ... Seems OK now ... Richard Sharpe
* Remove the copyright to Canon Information Systems Australia, as we don'tRichard Sharpe1998-06-211-7/+18
| | | | | | | | | | | | | | want them to have the copyright. Added a new DOSERR response code that Win95 returns, unimp, unimplemented. Added code to ignore errors on setting remote time, as Win 95 does not like the time being changed on a directory. Win NT and Samba are OK at this. This is the next to last clean-ups here. Next is to properly handle restore times on directories (except for Win95--see above). Now have Jay's changes in and have fixed a bug reported by Tim Lee.
* clitar.c: Fixed minor gcc -pedantic-error compile warnings.Jeremy Allison1998-06-201-5/+4
| | | | | passdb.c: Fixed stupid bug in read_sid_from_file(). Jeremy.
* Re-submit changes for CLITAR.Richard Sharpe1998-06-171-84/+291
| | | | | | | | | Have fixed the location of create_string_s back to clitar.c, and have added Jay Berkenbilt's changes. Have used safe_strcpy and safe_strcat everywhere and have tested with long file names extensively, but have not yet been able to check that it works OK on Solaris.
* clientgen: Added USE_SSL for client shutdown.Jeremy Allison1998-06-161-1/+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 is a security audit change of the main source.Jeremy Allison1998-05-121-42/+42
| | | | | | | | | | | | | | | | | | 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.
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-111-1/+1
| | | | | | | 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.
* clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'Jeremy Allison1998-05-081-0/+7
| | | | | | | | | messages. nttrans.c: More updates. smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke to use a new structure. web/swat.c: Fixed gcc complaints about shadowing global 'string'. Jeremy.
* Se-submitting clitar.c/Richard Sharpe1998-05-081-53/+433
| | | | | | | | I now only have one warning in my code which is the result of some code I have started working on but am not yet using in the code, along with a warning that is caused by one of the include files (a nested comment). I used -Wall -Wshadow -Wstrict-prototypes
* Rolling back again to the equivalent of revision 1.22, as the currentJeremy Allison1998-05-061-382/+25
| | | | | CVS head branch will not compile. Jeremy.
* Real fix for clitar.c problems. Have now made all the rightRichard Sharpe1998-05-061-25/+382
| | | | | | | | things static, and have done a 'make proto; make clean; make'. Still get 54 compiler warnings under Digital UNIX cc. Honest. :-)