summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clilist.c
Commit message (Collapse)AuthorAgeFilesLines
* (Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Kai Blin2009-01-021-4/+5
| | | | | | segmentation fault (with NAS-BASIC server). (cherry picked from commit 52654119cbf15acf6c4663b171df04e9a2bc26b7)
* Revert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Jeremy Allison2009-01-021-24/+683
| | | | | | | | | segmentation fault (with NASBASIC server)." Error in commit ! This reverts commit e3cb04101453762cda13f16e3e48d704761d5d67. (cherry picked from commit 4617080b6c4b80bee9c5ebe596636229f778fa62)
* Final part of fix for bug #5953 - smbclient crashes: cli_list_new ↵Kai Blin2009-01-021-683/+24
| | | | | | segmentation fault (with NASBASIC server). (cherry picked from commit e3cb04101453762cda13f16e3e48d704761d5d67)
* Fix bug #5953 - smbclient crashes: cli_list_new segmentation fault.Jeremy Allison2008-12-111-1/+1
| | | | | | Karolin: must be in 3.3 final. Thanks, Jeremy. (cherry picked from commit e9cad95d8728ac81ca13b5dea16167ceb4e4cf50)
* Fix from Guenter Kukkukk <linux@kukkukk.com> to fix listing againstJeremy Allison2008-02-281-1/+15
| | | | | | OS/2 servers. OS/2 returns eclass == ERRDOS && ecode == ERRnofiles for a zero entry directory listing. Jeremy.
* We don't need the extra null termination - we'veJeremy Allison2008-02-081-9/+4
| | | | | already got this in the cli_receive_trans calls. Jeremy.
* Make clilist work again with OS/2 (kukks help!).Jeremy Allison2008-02-081-1/+17
| | | | Jeremy.
* From kukks - prevent crashes if finfo.name == NULL.Jeremy Allison2008-02-081-0/+11
| | | | Jeremy.
* Try and fix length and finfo calls for older clients. WorkingJeremy Allison2008-02-081-7/+21
| | | | | on issues reported by kukks. Jeremy.
* Add SMB encryption. Still fixing client decrypt butJeremy Allison2007-12-261-2/+2
| | | | | negotiation works. Jeremy.
* Fix C++ warningsVolker Lendecke2007-12-081-1/+1
|
* Don't understand this. I have no changes here....Jeremy Allison2007-12-061-33/+64
| | | | Jeremy.
* Fix path length limits on cli_list (outgoing. IncomingJeremy Allison2007-12-051-5/+16
| | | | | will be fixed with pstring elimination). Jeremy.
* Remove pstrings. Ensure we validate offsets.Jeremy Allison2007-11-291-64/+132
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-2/+2
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.samba-misc-tags/initial-v3-2-testGerald (Jerry) Carter2007-10-101-2/+2
|
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison2007-10-101-2/+2
| | | | | | | to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy.
* r21768: Fix the client dfs code such that smbclient canJeremy Allison2007-10-101-7/+3
| | | | | | | | | process deep dfs links (ie. links that go to non root parts of a share). Make the directory handling conanonical in POSIX and Windows pathname processing. dfs should not be fully working in client tools. Please bug me if not. Jeremy.
* r18011: Should fix bug 3835.Derrell Lipman2007-10-101-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Jeremy: requires your eyes... If the remote connection timed out while cli_list() was retrieving its list of files, the error was not returned to the user, e.g. via smbc_opendir(), so the user didn't have a way to know to set the timeout longer and try again. This problem would occur when a very large directory is being read with a too-small timeout on the cli. Jeremy, although there were a couple of areas that needed to be handled, I needed to make one change that you should bless, in libsmb/clientgen.c. It was setting cli->smb_rw_error = smb_read_error; but smb_read_error is zero, so this had no effect. I'm now doing cli->smb_rw_error = READ_TIMEOUT; instead, and according to the OP, these (cumulative) changes (in a slightly different form) solve the problem. Please confirm this smb_rw_error change will have no other adverse effects that you can see. Derrell
* r17800: Start using struct timespec internally for file timesJeremy Allison2007-10-101-11/+13
| | | | | | | | | on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy.
* r17761: Handle times consistently across all client utils.Jeremy Allison2007-10-101-16/+2
| | | | | Fixes bugs reported in libsmbclient. Jeremy.
* r17333: Some C++ warningsVolker Lendecke2007-10-101-2/+3
|
* r16541: Fix #3862 reported by jason@ncac.gwu.edu.Jeremy Allison2007-10-101-3/+0
| | | | Jeremy.
* r15997: Fix bug in OS/2 Warp - it doesn't set the ff_lastJeremy Allison2007-10-101-1/+1
| | | | | | | offset correctly when doing info level 1 directory scans. Thanks to Guenter Kukkukk <Guenter.Kukkukk@kukkukk.com> for reporting this problem and testing the fix. Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r13316: Let the carnage begin....Gerald Carter2007-10-101-1/+5
| | | | Sync with trunk as off r13315
* r12758: r12127@cabra: derrell | 2006-01-03 15:22:18 -0500Derrell Lipman2007-10-101-5/+1
| | | | remove old superfluous comment and ifdef
* r12275: Fix memory leak found by Mikhail Kshevetskiy <kl@laska.dorms.spbu.ru>Jeremy Allison2007-10-101-2/+14
| | | | | and followed up by derrell@samba.org. Jeremy.
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2007-10-101-7/+7
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter2007-10-101-2/+0
|
* r7157: Ensure we abort a directory listing if we see the sameJeremy Allison2007-10-101-0/+7
| | | | | name twice between packets. Jeremy.
* r7151: Fix for bug #2698. If a unicode to unix charset conversion fails (due ↵Jeremy Allison2007-10-101-10/+40
| | | | | | | | | | | | to buggy iconv?) we can be left with a filename that doesn't exist on the remote machine. If we then do a findnext with this file the server gets confused and restarts from the beginning of the directory, causing directory listing loops. Fix this by keeping a copy of the "raw" filename data and length and using this as the argument to findnext. This won't fix the incorrect iconv conversion into the finfo struct but at least it ensures that directory listings always terminate. Tested against NTFS and FAT directories. Jeremy.
* r6994: Fix for bugid #2729 - it turns out resume keys are *mandatory* forJeremy Allison2007-10-101-5/+11
| | | | | | | a search when listing a W2K and above server from a FATxx filesystem only. Thanks to Steve Langasek <vorlon@debian.org> for giving me the essential info that allowed me to reproduce and thus fix this. Jeremy.
* r6225: get rid of warnings from my compiler about nested externsHerb Lewis2007-10-101-2/+2
|
* r5991: Fixup last entry offset correctly for level 260.Jeremy Allison2007-10-101-6/+10
| | | | | Should fix bug found by Derrell.Lipman@UnwiredUniverse.com. Jeremy.
* r5975: Re-arrange code and comments to make more sense.Jeremy Allison2007-10-101-12/+10
| | | | Jeremy.
* r5973: Fix up overwrite of last 2 bytes on clilist (could cause coredump).Jeremy Allison2007-10-101-4/+1
| | | | Jeremy.
* r5970: Fix old bug where ff_searchcount was being compared -1 ! This caused aJeremy Allison2007-10-101-1/+1
| | | | | filename to be processed twice. Jeremy.
* r5967: Fix typo bug where flags overwrote info level.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r5723: Add missing part of fix for #2271. After analysing the actions of a XPJeremy Allison2007-10-101-2/+4
| | | | | | | client against a Samba server. It never uses the "continue" flag, but always does "new search, continue from this file" instead. Change our client code to do the same (it appears that's all they test in W2K etc.). Jeremy.
* r5702: Fix bug #2271. Correctly pull out and use resume names in aJeremy Allison2007-10-101-20/+10
| | | | | | directory listing (we were incorrectly understanding what was returned in the "last name" entry). Jeremy.
* r5577: get recurse; dir working across single level dfs referralsGerald Carter2007-10-101-5/+8
|
* r5520: fix last remaining dfs issues with smbclient.Gerald Carter2007-10-101-2/+8
| | | | | | | | | | | | | | | * all the unix extension commands should work * send the correct TRANS2_FINDFIRST format to 2k to get a listing from a msdfs root share (tested against smbd as well). * mkdir, rmdir, etc... all seem ok. I'm sure bugs will pop up so keep testing. Last thing I plan on doing is to clean up the horrible mess with connection management in smbclient and global variables (so i can move the cli_cm_xx() routines to a separate file).
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-2/+2
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* Janitor for tpot...bugzilla #1098, msleep already exists on aixJim McDonough2004-02-231-1/+1
|
* Fixes to check for wraps which could cause coredumps.Jeremy Allison2003-10-291-1/+1
| | | | Jeremy.
* Correct fix (removed the earlier band-aid) for what I thought was a signingJeremy Allison2003-08-021-2/+10
| | | | | | | | | | | | bug with w2k. Turns out that when we're doing a trans/trans2/nttrans call the MID and send_sequence_number and reply_sequence_number must remain constant. This was something we got very wrong in earlier versions of Samba. I can now get a directory listing from WINNT\SYSTEM32 with the older earlier parameters for clilist.c This still needs to be fixed for the server side of Samba, client appears to be working happily now (I'm doing a signed smbtar download of an entire W2K3 image to test this :-). Jeremy.
* Fix bug we discovered in W2K client signing on secondary trans2 packets.Jeremy Allison2003-07-301-2/+3
| | | | | | Use W2K parameters. tpot please re-test smbclient with your problem directory. Jeremy.