[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Sun Nov 7 17:56:01 MST 2010


The branch, master has been updated
       via  c0297e5 waf: fixed tabs/spaces for python3.0
       via  b867dc9 waf: prevent us from modifying non-install libs during make install
       via  d738a04 s4-ldb: better error message when we try to register a module twice
       via  cc5e231 s4-pydrs: validate the DsGetNCChanges response
      from  e59bf5e s4-join: modify join behaviour according to domain level

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c0297e5e89c48153a6f34f2585f9934bae2b2fbe
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 8 11:11:32 2010 +1100

    waf: fixed tabs/spaces for python3.0
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Mon Nov  8 00:55:13 UTC 2010 on sn-devel-104

commit b867dc9ea204cfd449ba26f238f1fe733330fe75
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 8 11:01:13 2010 +1100

    waf: prevent us from modifying non-install libs during make install
    
    we need to ensure that 'make install' does not change any of our build
    libraries, and only changes the .inst.so libraries, otherwise doing a
    make test in the build directory directly after a make install could
    use the installed libraries, which would mean using the wrong
    LDB_MODULES_PATH
    
    this could cause the "unknown error" loading ldb modules when running
    some commands directly after a make install
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

commit d738a0448ddec6b1fb4491aabdf059ce837cb5ac
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 8 10:58:28 2010 +1100

    s4-ldb: better error message when we try to register a module twice
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

commit cc5e23135560f1f298a58ef59ee87f1c195d1854
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Nov 8 10:14:50 2010 +1100

    s4-pydrs: validate the DsGetNCChanges response
    
    check that object_count matches up with first_object

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_deps.py           |    2 +-
 buildtools/wafsamba/samba_install.py        |    8 ++++++--
 buildtools/wafsamba/samba_optimisation.py   |    8 ++++----
 source4/lib/ldb/common/ldb_modules.c        |    5 +++--
 source4/scripting/python/samba/drs_utils.py |    2 ++
 5 files changed, 16 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 60f2fa9..91737d5 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -255,7 +255,7 @@ def check_duplicate_sources(bld, tgt_list):
     for t in tgt_list:
         source_list = TO_LIST(getattr(t, 'source', ''))
         tpath = os.path.normpath(os_path_relpath(t.path.abspath(bld.env), t.env.BUILD_DIRECTORY + '/default'))
-	obj_sources = set()
+        obj_sources = set()
         for s in source_list:
             p = os.path.normpath(os.path.join(tpath, s))
             if p in obj_sources:
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 9401d22..634d5b1 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -18,7 +18,7 @@ def install_binary(self):
     install_ldflags = install_rpath(bld)
     build_ldflags   = build_rpath(bld)
 
-    if not Options.is_install or not self.samba_install:
+    if not Options.is_install:
         # just need to set rpath if we are not installing
         self.env.RPATH = build_ldflags
         return
@@ -38,6 +38,10 @@ def install_binary(self):
     # setup the right rpath link flags for the install
     self.env.RPATH = install_ldflags
 
+    if not self.samba_install:
+        # this binary is marked not to be installed
+        return
+
     # tell waf to install the right binary
     bld.install_as(os.path.join(install_path, orig_target),
                    os.path.join(self.path.abspath(bld.env), self.target),
@@ -77,7 +81,7 @@ def install_library(self):
         # install link. That stops us from overwriting the existing build
         # target, which has different ldflags
         self.done_install_library = True
-        t = self.clone('default')
+        t = self
         t.posted = False
         t.target += '.inst'
         self.env.RPATH = build_ldflags
diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py
index ad05348..951fd4c 100644
--- a/buildtools/wafsamba/samba_optimisation.py
+++ b/buildtools/wafsamba/samba_optimisation.py
@@ -154,12 +154,12 @@ def suncc_wrap(cls):
 	which have empty libs'''
 	if getattr(cls, 'solaris_wrap', False):
 		return
-        cls.solaris_wrap = True
-        oldrun = cls.run
-        def run(self):
+	cls.solaris_wrap = True
+	oldrun = cls.run
+	def run(self):
 		if self.env.CC_NAME == "sun" and not self.inputs:
 			self.env = self.env.copy()
 			self.env.append_value('LINKFLAGS', '-')
 		return oldrun(self)
-        cls.run = run
+	cls.run = run
 suncc_wrap(Task.TaskBase.classes['cc_link'])
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 7de7cca..ab06dc5 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -272,11 +272,12 @@ static const struct ldb_module_ops *ldb_find_module_ops(const char *name)
 
 int ldb_register_module(const struct ldb_module_ops *ops)
 {
-	struct ops_list_entry *entry = talloc(talloc_autofree_context(), struct ops_list_entry);
+	struct ops_list_entry *entry;
 
 	if (ldb_find_module_ops(ops->name) != NULL)
-		return -1;
+		return LDB_ERR_ENTRY_ALREADY_EXISTS;
 
+	entry = talloc(talloc_autofree_context(), struct ops_list_entry);
 	if (entry == NULL)
 		return -1;
 
diff --git a/source4/scripting/python/samba/drs_utils.py b/source4/scripting/python/samba/drs_utils.py
index 00efd78..5844b09 100644
--- a/source4/scripting/python/samba/drs_utils.py
+++ b/source4/scripting/python/samba/drs_utils.py
@@ -167,6 +167,8 @@ class drs_Replicate:
 
         while True:
             (level, ctr) = self.drs.DsGetNCChanges(self.drs_handle, req_level, req)
+            if ctr.first_object == None and ctr.object_count != 0:
+                raise RuntimeError("DsGetNCChanges: NULL first_object with object_count=%u" % (ctr.object_count))
             self.net.replicate_chunk(self.replication_state, level, ctr, schema=schema)
             if ctr.more_data == 0:
                 break


-- 
Samba Shared Repository


More information about the samba-cvs mailing list