[SCM] Samba Shared Repository - branch master updated

Garming Sam garming at samba.org
Wed Jul 13 01:00:03 UTC 2016


The branch, master has been updated
       via  8a5a904 dsdb: Improve debugging during SD recursion failure
       via  ba8e868 dsdb: Avoid search on * in replmd_replicated_apply_next()
       via  b9b6443 samba-tool drs replicate: Allow replication call to take as long as required
       via  2d3fdc0 pyrpc: Allow control of RPC timeout for IRPC
       via  cea4a4b tests: Allow alternative error code for backupkey test
      from  cc339b0 libads: improve debug messages in sitename_fetch()

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


- Log -----------------------------------------------------------------
commit 8a5a9045ad987ceb26c6c6eea856b8ab56028236
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Jul 11 16:05:49 2016 +1200

    dsdb: Improve debugging during SD recursion failure
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>
    
    Autobuild-User(master): Garming Sam <garming at samba.org>
    Autobuild-Date(master): Wed Jul 13 02:59:25 CEST 2016 on sn-devel-144

commit ba8e8687bd978092d8f74f283d008b9a5b3ff122
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Jul 9 07:47:15 2016 +1200

    dsdb: Avoid search on * in replmd_replicated_apply_next()
    
    A search on * can be quite expensive if we have to post-process any of the results
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>

commit b9b64438d5198b564f5c3dc5699a8cd7d4f04f5f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Jul 9 16:38:14 2016 +1200

    samba-tool drs replicate: Allow replication call to take as long as required
    
    This matches the behaviour in the drsuapi server for DsReplicaSync
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>

commit 2d3fdc0a45b7acae64b90ab701fcec170c4da07d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Jul 9 16:36:52 2016 +1200

    pyrpc: Allow control of RPC timeout for IRPC
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Garming Sam <garming at catalyst.net.nz>

commit cea4a4b9b22c78f9736e2290d302a88644db4031
Author: Garming Sam <garming at catalyst.net.nz>
Date:   Tue Jul 12 17:10:15 2016 +1200

    tests: Allow alternative error code for backupkey test
    
    Signed-off-by: Garming Sam <garming at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 python/samba/netcmd/drs.py                      |  4 +++-
 source4/dsdb/samdb/ldb_modules/descriptor.c     |  6 +++++-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |  5 +++--
 source4/lib/messaging/pymessaging.c             |  2 ++
 source4/librpc/rpc/pyrpc_util.c                 | 11 +++++++++--
 source4/torture/rpc/backupkey_heimdal.c         | 10 ++++++----
 6 files changed, 28 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index cbd1672..4098131 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -34,6 +34,7 @@ from samba import drs_utils, nttime2string, dsdb
 from samba.dcerpc import drsuapi, misc
 import common
 from samba.join import join_clone
+from samba.messaging import IRPC_CALL_TIMEOUT_INF
 
 def drsuapi_connect(ctx):
     '''make a DRSUAPI connection to the server'''
@@ -317,7 +318,8 @@ class cmd_drs_replicate(Command):
             return
 
         if local_online:
-            server_bind = drsuapi.drsuapi("irpc:dreplsrv", self.lp)
+            server_bind = drsuapi.drsuapi("irpc:dreplsrv", lp_ctx=self.lp,
+                                          timeout=IRPC_CALL_TIMEOUT_INF)
             server_bind_handle = misc.policy_handle()
         else:
             drsuapi_connect(self)
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index 2baf4af..e75d79d 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -1144,7 +1144,11 @@ static int descriptor_sd_propagation_object(struct ldb_module *module,
 		ret = ldb_wait(sub_req->handle, LDB_WAIT_ALL);
 	}
 	if (ret != LDB_SUCCESS) {
-		return ldb_module_operr(module);
+		ldb_asprintf_errstring(ldb_module_get_ctx(module),
+				       "descriptor_modify on %s failed: %s",
+				       ldb_dn_get_linearized(msg->dn),
+				       ldb_errstring(ldb_module_get_ctx(module)));
+		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	if (sd_propagation_control->critical != 0) {
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 9a1ff16..c6dc6c6 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -5296,9 +5296,10 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
 	char *tmp_str;
 	char *filter;
 	struct ldb_request *search_req;
-	static const char *attrs[] = { "*", "parentGUID", "instanceType",
+	static const char *attrs[] = { "repsFrom", "replUpToDateVector",
+				       "parentGUID", "instanceType",
 				       "replPropertyMetaData", "nTSecurityDescriptor",
-				       NULL };
+				       "isDeleted", NULL };
 	struct GUID_txt_buf guid_str_buf;
 
 	if (ar->index_current >= ar->objs->num_objects) {
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 0eca139..cef0703 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -399,4 +399,6 @@ void initmessaging(void)
 
 	Py_INCREF((PyObject *)&imessaging_Type);
 	PyModule_AddObject(mod, "Messaging", (PyObject *)&imessaging_Type);
+	PyModule_AddObject(mod, "IRPC_CALL_TIMEOUT", PyInt_FromLong(IRPC_CALL_TIMEOUT));
+	PyModule_AddObject(mod, "IRPC_CALL_TIMEOUT_INF", PyInt_FromLong(IRPC_CALL_TIMEOUT_INF));
 }
diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c
index b74eb4c..a9807a8 100644
--- a/source4/librpc/rpc/pyrpc_util.c
+++ b/source4/librpc/rpc/pyrpc_util.c
@@ -99,11 +99,12 @@ PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, Py
 	const char *binding_string;
 	PyObject *py_lp_ctx = Py_None, *py_credentials = Py_None, *py_basis = Py_None;
 	NTSTATUS status;
+	unsigned int timeout = (unsigned int)-1;
 	const char *kwnames[] = {
-		"binding", "lp_ctx", "credentials", "basis_connection", NULL
+		"binding", "lp_ctx", "credentials", "timeout", "basis_connection", NULL
 	};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|OOO:samr", discard_const_p(char *, kwnames), &binding_string, &py_lp_ctx, &py_credentials, &py_basis)) {
+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|OOIO:samr", discard_const_p(char *, kwnames), &binding_string, &py_lp_ctx, &py_credentials, &timeout, &py_basis)) {
 		return NULL;
 	}
 
@@ -231,6 +232,12 @@ PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, Py
 		ret->pipe->conn->flags |= DCERPC_NDR_REF_ALLOC;
 		ret->binding_handle = ret->pipe->binding_handle;
 	}
+
+	/* reset timeout for the handle */
+	if (timeout != ((unsigned int)-1)) {
+		dcerpc_binding_handle_set_timeout(ret->binding_handle, timeout);
+	}
+
 	return (PyObject *)ret;
 }
 
diff --git a/source4/torture/rpc/backupkey_heimdal.c b/source4/torture/rpc/backupkey_heimdal.c
index 32b0235..c0db48d 100644
--- a/source4/torture/rpc/backupkey_heimdal.c
+++ b/source4/torture/rpc/backupkey_heimdal.c
@@ -1939,10 +1939,12 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
 					  WERR_INVALID_ACCESS,
 					  "decrypt should fail with WERR_INVALID_ACCESS");
 	} else {
-		torture_assert_werr_equal(tctx,
-					  r.out.result,
-					  WERR_INVALID_PARAM,
-					  "decrypt should fail with WERR_INVALID_PARAM");
+		if (!W_ERROR_EQUAL(r.out.result, WERR_INVALID_PARAM)) {
+			torture_assert_werr_equal(tctx,
+						  r.out.result,
+						  WERR_INVALID_ACCESS,
+						  "decrypt should fail with WERR_INVALID_ACCESS or WERR_INVALID_PARAM");
+		}
 	}
 
 	/* Decrypt */


-- 
Samba Shared Repository



More information about the samba-cvs mailing list