summaryrefslogtreecommitdiff
path: root/source3/client/clitar.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-29s3-client: Make sure we only write to an opened file.Andreas Schneider1-4/+10
Found by clang-analyzer.
2009-11-29s3: "tar_parseargs" only looks at the mtimeVolker Lendecke1-1/+1
2009-11-29s3: "dotareof" only looks at the file typeVolker Lendecke1-1/+1
2009-11-29s3: Pass the "fake dir create times" parameter to sys_*statVolker Lendecke1-2/+3
Step 0 to restore it as a per-share paramter
2009-11-23Revert "s3: Make the implicit reference to Protocol in mask_match_list() ↵Volker Lendecke1-7/+2
explicit" This reverts commit 1e22899d268ae5a089f941a204413c07ee64fc78.
2009-11-23Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke1-2/+2
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-21s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke1-2/+2
2009-11-21s3: Make the implicit reference to Protocol in mask_match_list() explicitVolker Lendecke1-2/+7
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-2/+3
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-05-06Make cli_setatr async.Jeremy Allison1-2/+2
Jeremy.
2009-05-05Make cli_getatr() async.Jeremy Allison1-1/+3
Jeremy.
2009-05-03Fix some warnings due to uint16_t!=-1 always being trueVolker Lendecke1-1/+1
2009-04-30Cause cli_close to return an NTSTATUS.Jeremy Allison1-2/+3
Jeremy.
2009-04-30Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.Jeremy Allison1-6/+5
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
2009-04-22Make cli_chkpath async.Jeremy Allison1-1/+1
Jeremy
2009-04-21Make cli_mkdir async. Change it to return NTSTATUS.Jeremy Allison1-1/+1
Jeremy.
2009-03-05Fix bug #6161 - smbclient corrupts source path in tar modeJeremy Allison1-0/+16
This was my fault. I broke the smbclient tar argument processing in creating the string for chdir when removing pstrings. Jeremy.
2008-12-31Fix all warnings in source3 with gcc4.3.Jeremy Allison1-5/+12
Jeremy.
2008-10-14Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij1-14/+14
2008-06-17Fix a brown paper bag segfault in clitarVolker Lendecke1-1/+1
Thanks to "No Body is Perfect" from gmail, whoever that is :-) Volker (cherry picked from commit 679d8dfa390601f777bfb43c02cd921eae5edcf4) (This used to be commit b8e1d62b8e8f724b855c8ab9801abee0b2791e36)
2008-03-15Fix Coverity ID 564Volker Lendecke1-10/+0
finfo1==NULL just does not happen in current code (This used to be commit 9ea0078c3151984a901c9bba559ae2bd7959e077)
2008-01-24Fix Coverity ID 463Volker Lendecke1-1/+3
(This used to be commit 21d126c56a633d2d72ffad08db7331ecc0ee3c0c)
2008-01-23strtok -> strtok_rVolker Lendecke1-3/+4
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)
2007-12-21Remove next_token_nr_talloc and its associated globalVolker Lendecke1-5/+55
Only client.c and clitar.c used this, I think they should carry the static themselves. Also move the a bit funny routine toktocliplist to clitar.c, the only place where it is used. (This used to be commit 86d9412611fd99c21e15c71d30a3f95e35d8535b)
2007-12-09C++ warningVolker Lendecke1-1/+1
(This used to be commit 85a7f800b6ff8a21d234cee1a24123fb48bafa13)
2007-12-07Remove pstring from clitar.cJeremy Allison1-141/+225
Jeremy (This used to be commit 1d5fee5038413c90b367434f9066d947849bdaed)
2007-12-06Add popt to binaries in makefile. Hack clitar to compile until I fix it.Jeremy Allison1-12/+7
Jeremy. (This used to be commit 252ef28bb8f1406fdd92edba8538cb9e88f0b77f)
2007-11-16Fix bug #4393 smbclient does not store files with zero filesize in tar-archivesJeremy Allison1-4/+3
from tometzky@batory.org.pl. Jeremy. (This used to be commit f3bd5e828af04f33178a66f9f332199f7d395b7b)
2007-11-15More pstring removal. This one was tricky. I had to addJeremy Allison1-1/+1
one horror (pstring_clean_name()) which will have to remain until I've removed all pstrings from the client code. Jeremy. (This used to be commit 1ea3ac80146b83c2522b69e7747c823366a2b47d)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-19/+19
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher1-1/+1
which matches what samba4 has. also fix all the callers to prevent compiler warnings metze (This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)
2007-10-10r21768: Fix the client dfs code such that smbclient canJeremy Allison1-1/+1
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. (This used to be commit 1c9e10569cd97ee41de39f9f012bea4e4c932b5d)
2007-10-10r21714: Change the VFS interface to use struct timespecJeremy Allison1-1/+1
for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
2007-10-10r18047: More C++ stuffVolker Lendecke1-3/+3
(This used to be commit 86f4ca84f2df2aa8977eb24828e3aa840dda7201)
2007-10-10r17850: Another dummy checkin for the build farm to retryVolker Lendecke1-1/+1
(This used to be commit ac7087a6516fa7e0d10523a892acae852a80e29e)
2007-10-10r17800: Start using struct timespec internally for file timesJeremy Allison1-16/+21
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. (This used to be commit 425280a1d23f97ef0b0be77462386d619f47b21d)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-0/+4
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16230: Fix Klocwork #861 and others. localtime and asctimeJeremy Allison1-1/+1
can return NULL. Ensure we check all returns correctly. Jeremy. (This used to be commit 6c61dc8ed6d84f310ef391fb7700e93ef42c4afc)
2007-10-10r15141: Fix for #3592 inspired by Justin Best <justinb@pdxmission.org>.Jeremy Allison1-19/+30
Ignore a file in a tar output if the first read fails. Also cope with <2GB read fail. Jeremy. (This used to be commit 1b73e699e11c6e26e9a9123e74190eebd170fc05)
2007-10-10r14248: Fix Coverity bug # 84Volker Lendecke1-0/+1
(This used to be commit 811ae2b21f98bd8926f8edd70de19fe18265e28e)
2007-10-10r14246: Fix Coverity bug # 85Volker Lendecke1-0/+2
(This used to be commit ebc21336d80c5d417b309d4f9c22c074c324e123)
2007-10-10r14242: Fix Coverity bug # 82Volker Lendecke1-0/+2
(This used to be commit 9f645e996279be74aaeebcbecbfa07adce49ec7c)
2007-10-10r14128: Remove warning generated by coverity scan tool (missing SAFE_FREE in ↵Steve French1-0/+1
error path) (This used to be commit 33a1e26114d7dfdfb72e393efa399454a588e11e)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-5/+2
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. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13535: Fix #2353 based on a patch by William Jojo.Jeremy Allison1-3/+4
Jeremy. (This used to be commit fe63a6ee06149195032320dd0fb9b6c7dfb460d3)
2007-10-10r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")Jeremy Allison1-1/+1
and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9)
2007-10-10r12045: More warning fixes... Just a few more to go.Jeremy Allison1-0/+2
Jeremy. (This used to be commit cd192ed79a531c6775cdbfb35f0eb2e0fa230ce9)
2007-10-10r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison1-1/+1
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. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)