The branch, master has been updated via 6f47497 lib/ldb: add missing newline in the output of ldb_ldif_write_trace() via 11f5d54 s4:samba-tool/testparm: report a CommandError if loading of the config file fails via 1ecc76b lib/addns: remove compiler warnings via eecc1d2 lib/addns: don't depend on the order in resp->answers[] via b59c5db lib/addns: remove pointless check for resp->num_additionals != 1 from 095c762 selftest: Add --tmpdir to 'samba-tool gpo create' test
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 6f47497610352f72128bdbcd3b45313ea9a265ab Author: Stefan Metzmacher <me...@samba.org> Date: Mon Nov 12 11:42:52 2012 +0100 lib/ldb: add missing newline in the output of ldb_ldif_write_trace() Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Tue Nov 13 13:53:31 CET 2012 on sn-devel-104 commit 11f5d54cbb10fd5c5f0e1718427609709c3476f4 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Nov 9 09:01:29 2012 +0100 s4:samba-tool/testparm: report a CommandError if loading of the config file fails Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 1ecc76b2480c884a66e598ff6b1f9000bb0931c0 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Nov 9 09:08:51 2012 +0100 lib/addns: remove compiler warnings Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit eecc1d294256210ee8c2f6ab79d21b835258a6d4 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Nov 9 08:59:36 2012 +0100 lib/addns: don't depend on the order in resp->answers[] Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit b59c5db5f74f56c0536635a41ae51c389109ceb5 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Nov 9 08:55:40 2012 +0100 lib/addns: remove pointless check for resp->num_additionals != 1 We never use resp->additionals, so there's no reason to check. This fixes dns updates against BIND9 (used in a Samba4 domain). Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/addns/dnsgss.c | 20 ++++++++++++++------ lib/ldb/common/ldb_ldif.c | 2 +- source4/scripting/python/samba/netcmd/testparm.py | 5 ++++- 3 files changed, 19 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c index 64a7d85..f7ed1d1 100644 --- a/lib/addns/dnsgss.c +++ b/lib/addns/dnsgss.c @@ -92,7 +92,7 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, DNS_ERROR err; gss_OID_desc krb5_oid_desc = - { 9, (const char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; + { 9, discard_const("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02") }; *ctx = GSS_C_NO_CONTEXT; input_ptr = NULL; @@ -164,6 +164,8 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, struct dns_request *resp; struct dns_buffer *buf; struct dns_tkey_record *tkey; + struct dns_rrec *tkey_answer = NULL; + uint16_t i; err = dns_receive(mem_ctx, conn, &buf); if (!ERR_DNS_IS_OK(err)) goto error; @@ -174,10 +176,16 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, /* * TODO: Compare id and keyname */ - - if ((resp->num_additionals != 1) || - (resp->num_answers == 0) || - (resp->answers[0]->type != QTYPE_TKEY)) { + + for (i=0; i < resp->num_answers; i++) { + if (resp->answers[i]->type != QTYPE_TKEY) { + continue; + } + + tkey_answer = resp->answers[i]; + } + + if (tkey_answer == NULL) { err = ERROR_DNS_INVALID_MESSAGE; goto error; } @@ -222,7 +230,7 @@ DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm, gss_name_t targ_name; gss_OID_desc nt_host_oid_desc = - {10, (const char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"}; + {10, discard_const("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01")}; TALLOC_CTX *mem_ctx; diff --git a/lib/ldb/common/ldb_ldif.c b/lib/ldb/common/ldb_ldif.c index 419906b..a2e4488 100644 --- a/lib/ldb/common/ldb_ldif.c +++ b/lib/ldb/common/ldb_ldif.c @@ -333,7 +333,7 @@ static int ldb_ldif_write_trace(struct ldb_context *ldb, if (in_trace && secret_attributes && ldb_attr_in_list(secret_attributes, msg->elements[i].name)) { /* Deliberatly skip printing this password */ - ret = fprintf_fn(private_data, "# %s::: REDACTED SECRET ATTRIBUTE", + ret = fprintf_fn(private_data, "# %s::: REDACTED SECRET ATTRIBUTE\n", msg->elements[i].name); CHECK_RET; continue; diff --git a/source4/scripting/python/samba/netcmd/testparm.py b/source4/scripting/python/samba/netcmd/testparm.py index 34c8fa5..9251469 100644 --- a/source4/scripting/python/samba/netcmd/testparm.py +++ b/source4/scripting/python/samba/netcmd/testparm.py @@ -82,7 +82,10 @@ class cmd_testparm(Command): raise CommandError("Both a DNS name and an IP address are " "required for the host access check") - lp = sambaopts.get_loadparm() + try: + lp = sambaopts.get_loadparm() + except RuntimeError, err: + raise CommandError(err) # We need this to force the output samba.set_debug_level(2) -- Samba Shared Repository