summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_shadow_copy.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-05build: Remove SMB_STRUCT_DIR defineAndrew Bartlett1-12/+12
2012-04-05build: Remove SMB_STRUCT_DIRENT defineAndrew Bartlett1-7/+7
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe1-8/+8
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-05-31struct make "struct shadow_copy_data" its own talloc contextVolker Lendecke1-1/+1
2011-05-31s3: Remove SHADOW_COPY_DATA typedefVolker Lendecke1-1/+4
2011-03-30s3: only include ntioctl.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-vfs: include smbd/smbd.h in vfs modules.Günther Deschner1-0/+1
Guenther
2011-02-09Add fdopendir to the VFS. We will use this to reuse a directory fd already ↵Jeremy Allison1-0/+53
open by NtCreateX. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
2009-07-24Make the smbd VFS typesafeVolker Lendecke1-15/+13
2009-02-09Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIRSteven Danneman1-2/+2
* this allows VFS implementations that prefetch stat information on readdir to return it through one VFS call * backwards compatibility is maintained by passing in NULL * if the system readdir doesn't return stat info, the stat struct is set to invalid
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-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. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell1-2/+1
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
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-10r20261: merge 20260 from samba_3_0_24Herb Lewis1-2/+3
clean up a bunch of no previous prototype warnings (This used to be commit c60687db112405262adf26dbf267804b04074e67)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-14/+14
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
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-10r9483: Changed DIR to SMB_STRUCT_DIR because of the amazing stupidity of a ↵Jeremy Allison1-9/+9
UNIX vendor not understanding abstract data types :-(. Jeremy. (This used to be commit be5b4e2fa3ed30b0ff01b47d2354e5f782a12e25)
2007-10-10r7893: Add in the extra parameters to opendir() to fix the large ↵Jeremy Allison1-3/+3
directory/insane app problem. Rev vfs version. Doesn't change the normal codepath. Jeremy. (This used to be commit 0f03a6bdcdbdf60da81e0aeffa84ac6e48fc6a04)
2007-10-10r7541: Patch from core@road-star.jp for bug #2792. Ensure the shadow copyJeremy Allison1-0/+24
module hooks seekdir, telldir, rewinddir to match updated large directory code. Jeremy. (This used to be commit 0cdc62b60b6152cb67e517d70f4e4681dca8f4df)
2007-10-10r4738: Fix for bug #2238 - memory leak in shadow copy vfs.Jeremy Allison1-0/+1
Jeremy. (This used to be commit fb7f1aff7c96e4672641f80b74a058abf25d0d6d)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-3/+3
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3671: More warning fixes from Rob Foehl <rwf@loonybin.net>.Jeremy Allison1-6/+6
Jeremy. (This used to be commit 3850f142c174034397451de8457564b9604113c5)
2007-10-10r329: add the shadow_copy vfs moduleStefan Metzmacher1-0/+227
I'll add documentation to the Samba-Howto-Collection metze (This used to be commit 2bef5d2741807fe3f38a95710533520700e253a4)