[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Thu Jun 30 08:53:02 MDT 2011
The branch, master has been updated
via 76467dc s3:build: add vfs_examples to the everything target
via c2e8832 s3:build: add a vfs_examples target.
via 197df81 examples/VFS: add include path for s3's autoconf config.h
via 576cb57 examples/VFS: fix skel_transparent.c in reference to shadow_copy changes
via 7766728 examples/VFS: fix skel_opaque.c in reference to shadow_copy changes
via 6930afc examples/VFS: fix shadow_copy_test.c in reference to shadow_copy changes
via 1f72088 s3:registry: when deleting the records for a key, also delete the sorted subkeys cache
via 2b162db s3:registry: add helper function regdb_delete_sorted_subkeys()
from c234b4b lib/util/string_wrappers: move everything into one HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS block
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 76467dc4064572fdf7ddea067b0f23ff082aebfe
Author: Michael Adam <obnox at samba.org>
Date: Thu Jun 30 15:15:22 2011 +0200
s3:build: add vfs_examples to the everything target
So that one can not pass autobuild without keeping the vfs examples intact.
Autobuild-User: Michael Adam <obnox at samba.org>
Autobuild-Date: Thu Jun 30 16:52:48 CEST 2011 on sn-devel-104
commit c2e88320a0952a7ee53c398b1533fb184a3ec0ae
Author: Michael Adam <obnox at samba.org>
Date: Thu Jun 30 13:54:52 2011 +0200
s3:build: add a vfs_examples target.
commit 197df817a3f70707715e784a9330017c74ccb547
Author: Michael Adam <obnox at samba.org>
Date: Thu Jun 30 13:53:54 2011 +0200
examples/VFS: add include path for s3's autoconf config.h
commit 576cb574a15158a33feab48be3c5ed05721f28fc
Author: Björn Baumbach <bb at sernet.de>
Date: Wed Jun 29 16:57:27 2011 +0200
examples/VFS: fix skel_transparent.c in reference to shadow_copy changes
Signed-off-by: Michael Adam <obnox at samba.org>
commit 776672805c35bb2db760194730c46b96019e0da1
Author: Björn Baumbach <bb at sernet.de>
Date: Wed Jun 29 16:56:45 2011 +0200
examples/VFS: fix skel_opaque.c in reference to shadow_copy changes
Signed-off-by: Michael Adam <obnox at samba.org>
commit 6930afc9f4e613a660bbe716e849f5db7276491c
Author: Björn Baumbach <bb at sernet.de>
Date: Wed Jun 29 16:53:57 2011 +0200
examples/VFS: fix shadow_copy_test.c in reference to shadow_copy changes
Signed-off-by: Michael Adam <obnox at samba.org>
commit 1f72088633c2215a23e086c8627f35621b47ffec
Author: Michael Adam <obnox at samba.org>
Date: Thu Jun 30 14:37:49 2011 +0200
s3:registry: when deleting the records for a key, also delete the sorted subkeys cache
This prevents orphaned empty sorted subkeys cache records from filling the database.
Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>
Signed-off-by: Michael Adam <obnox at samba.org>
commit 2b162db6e9cc3e098f339516bbda719618664a83
Author: Michael Adam <obnox at samba.org>
Date: Thu Jun 30 14:36:35 2011 +0200
s3:registry: add helper function regdb_delete_sorted_subkeys()
Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>
Signed-off-by: Michael Adam <obnox at samba.org>
-----------------------------------------------------------------------
Summary of changes:
examples/VFS/Makefile.in | 1 +
examples/VFS/shadow_copy_test.c | 13 ++++++++++---
examples/VFS/skel_opaque.c | 3 ++-
examples/VFS/skel_transparent.c | 3 ++-
source3/Makefile.in | 14 +++++++++++++-
source3/registry/reg_backend_db.c | 15 +++++++++++++++
6 files changed, 43 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in
index 8fe414a..9591186 100644
--- a/examples/VFS/Makefile.in
+++ b/examples/VFS/Makefile.in
@@ -9,6 +9,7 @@ SHLIBEXT = @SHLIBEXT@
OBJEXT = @OBJEXT@
FLAGS = $(CFLAGS) $(CPPFLAGS) -fPIC \
-Iinclude -I$(SAMBA_SOURCE)/include \
+ -I$(SAMBA_SOURCE)/include/autoconf \
-I$(SAMBA_SOURCE)/../popt \
-I$(SAMBA_SOURCE)/../lib/replace \
-I$(SAMBA_SOURCE)/../lib/talloc \
diff --git a/examples/VFS/shadow_copy_test.c b/examples/VFS/shadow_copy_test.c
index d4da238..a47d2ee 100644
--- a/examples/VFS/shadow_copy_test.c
+++ b/examples/VFS/shadow_copy_test.c
@@ -19,6 +19,8 @@
*/
#include "includes.h"
+#include "ntioctl.h"
+#include "smbd/proto.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
@@ -50,7 +52,10 @@
Directories are always displayed...
*/
-static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+static int test_get_shadow_copy_data(vfs_handle_struct *handle,
+ files_struct *fsp,
+ struct shadow_copy_data *shadow_copy_data,
+ bool labels)
{
uint32 num = 3;
uint32 i;
@@ -59,7 +64,7 @@ static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fs
if (labels) {
if (num) {
- shadow_copy_data->labels = talloc_zero_array(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num);
+ shadow_copy_data->labels = talloc_zero_array(shadow_copy_data,SHADOW_COPY_LABEL,num);
} else {
shadow_copy_data->labels = NULL;
}
@@ -81,5 +86,7 @@ static struct vfs_fn_pointers vfs_test_shadow_copy_fns = {
NTSTATUS vfs_shadow_copy_test_init(void)
{
- return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy_test", &vfs_test_shadow_copy_fns);
+ return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
+ "shadow_copy_test",
+ &vfs_test_shadow_copy_fns);
}
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index f839993..69a7147 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -23,6 +23,7 @@
#include "includes.h"
+#include "smbd/proto.h"
/* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
SAMBA DEVELOPERS GUIDE!!!!!!
@@ -65,7 +66,7 @@ static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
return -1;
}
-static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
{
errno = ENOSYS;
return -1;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 7c91a61..c9fbc79 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -23,6 +23,7 @@
#include "includes.h"
+#include "smbd/proto.h"
/* PLEASE,PLEASE READ THE VFS MODULES CHAPTER OF THE
SAMBA DEVELOPERS GUIDE!!!!!!
@@ -64,7 +65,7 @@ static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
return SMB_VFS_NEXT_SET_QUOTA(handle, qtype, id, dq);
}
-static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels)
+static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels)
{
return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
}
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 299a9ec..e052881 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1632,7 +1632,8 @@ idl_full::
everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
- $(EVERYTHING_PROGS)
+ $(EVERYTHING_PROGS) \
+ vfs_examples
.SUFFIXES:
.SUFFIXES: .c .o .lo
@@ -3559,3 +3560,14 @@ bin/smbtorture4: $(BINARY_PREREQS)
bin/ndrdump4: $(BINARY_PREREQS)
$(MAKE) -f Makefile-smbtorture4 bin/ndrdump4
+
+.PHONY: vfs_examples
+
+vfs_examples:
+ ( \
+ cd ../examples/VFS && \
+ ./autogen.sh && \
+ ./configure && \
+ make clean && \
+ make \
+ )
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 812dd0d..2fda238 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -712,6 +712,13 @@ static WERROR regdb_delete_subkeylist(struct db_context *db, const char *keyname
return regdb_delete_key_with_prefix(db, keyname, NULL);
}
+static WERROR regdb_delete_sorted_subkeys(struct db_context *db,
+ const char *keyname)
+{
+ return regdb_delete_key_with_prefix(db, keyname, REG_SORTED_SUBKEYS_PREFIX);
+}
+
+
static WERROR regdb_delete_key_lists(struct db_context *db, const char *keyname)
{
WERROR werr;
@@ -730,6 +737,14 @@ static WERROR regdb_delete_key_lists(struct db_context *db, const char *keyname)
goto done;
}
+ werr = regdb_delete_sorted_subkeys(db, keyname);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(1, (__location__ " Deleting %s\\%s failed: %s\n",
+ REG_SORTED_SUBKEYS_PREFIX, keyname,
+ win_errstr(werr)));
+ goto done;
+ }
+
werr = regdb_delete_subkeylist(db, keyname);
if (!W_ERROR_IS_OK(werr)) {
DEBUG(1, (__location__ " Deleting %s failed: %s\n",
--
Samba Shared Repository
More information about the samba-cvs
mailing list