[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Aug 22 02:00:02 UTC 2018
The branch, master has been updated
via fb81fb2 libads: Simplify parse_spn()
via 75ced0d libads: Fix an error path talloc leak
via 781faca dsdb: Fix a typo
via 09acfb7 dsdb: Fix CID 1438461 Error handling issues (CHECKED_RETURN)
via f16d917 libgpo: Fix CID 1438462 Error handling issues (CHECKED_RETURN)
from 7460d9b smbd: Remove koplocks->contend_level2 callbacks
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fb81fb2d93be7fdf5081a057e4d70d9f53a72df3
Author: Volker Lendecke <vl at samba.org>
Date: Tue Aug 21 21:22:42 2018 +0200
libads: Simplify parse_spn()
A few lines less and quite some bytes less .text
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Aug 22 03:59:51 CEST 2018 on sn-devel-144
commit 75ced0d15514b2d4707eb1813c461f135d9d20bf
Author: Volker Lendecke <vl at samba.org>
Date: Tue Aug 21 21:19:49 2018 +0200
libads: Fix an error path talloc leak
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 781faca0cb9b11a048c843e35ee98c82b912e05b
Author: Volker Lendecke <vl at samba.org>
Date: Tue Aug 21 21:11:43 2018 +0200
dsdb: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 09acfb762a734bb71f2623da55230006bfda35e0
Author: Volker Lendecke <vl at samba.org>
Date: Tue Aug 21 21:41:05 2018 +0200
dsdb: Fix CID 1438461 Error handling issues (CHECKED_RETURN)
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f16d917297031d6fc92667b83b9c842195c63bf8
Author: Volker Lendecke <vl at samba.org>
Date: Tue Aug 21 21:38:01 2018 +0200
libgpo: Fix CID 1438462 Error handling issues (CHECKED_RETURN)
Yes, this creates a leak of "data", but the other error exits in this
function are the same.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/libads/util.c | 21 +++++++++------------
source3/libgpo/gpext/registry.c | 14 ++++++++++++--
source4/dsdb/repl/replicated_objects.c | 5 +++--
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 10 +++++++---
4 files changed, 31 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libads/util.c b/source3/libads/util.c
index 68c7aed..354125b 100644
--- a/source3/libads/util.c
+++ b/source3/libads/util.c
@@ -166,7 +166,7 @@ struct spn_struct *parse_spn(TALLOC_CTX *ctx, const char *srvprinc)
result->serviceclass = talloc_strdup(result, srvprinc);
if (result->serviceclass == NULL) {
DBG_ERR("Out of memory\n");
- return NULL;
+ goto fail;
}
result->port = -1;
@@ -175,8 +175,7 @@ struct spn_struct *parse_spn(TALLOC_CTX *ctx, const char *srvprinc)
/* illegal */
DBG_ERR("Failed to parse spn %s, no host definition\n",
srvprinc);
- TALLOC_FREE(result);
- goto out;
+ goto fail;
}
/* terminate service principal */
@@ -204,23 +203,20 @@ struct spn_struct *parse_spn(TALLOC_CTX *ctx, const char *srvprinc)
/* illegal */
DBG_ERR("Failed to parse spn %s, illegal host definition\n",
srvprinc);
- TALLOC_FREE(result);
- goto out;
+ goto fail;
}
result->host = host_str;
if (result->servicename != NULL && (strlen(result->servicename) == 0)) {
DBG_ERR("Failed to parse spn %s, empty servicename "
"definition\n", srvprinc);
- TALLOC_FREE(result);
- goto out;
+ goto fail;
}
if (port_str != NULL) {
if (strlen(port_str) == 0) {
DBG_ERR("Failed to parse spn %s, empty port "
"definition\n", srvprinc);
- TALLOC_FREE(result);
- goto out;
+ goto fail;
}
result->port = (int32_t)strtol(port_str, NULL, 10);
if (result->port <= 0
@@ -229,10 +225,11 @@ struct spn_struct *parse_spn(TALLOC_CTX *ctx, const char *srvprinc)
DBG_ERR("Failed to parse spn %s, port number "
"convertion failed\n", srvprinc);
errno = 0;
- TALLOC_FREE(result);
- goto out;
+ goto fail;
}
}
-out:
return result;
+fail:
+ TALLOC_FREE(result);
+ return NULL;
}
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c
index 525493f..ffa1d02 100644
--- a/source3/libgpo/gpext/registry.c
+++ b/source3/libgpo/gpext/registry.c
@@ -111,6 +111,7 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx,
struct registry_value *data = NULL;
struct gp_registry_entry *entry = NULL;
enum gp_reg_action action = GP_REG_ACTION_NONE;
+ enum ndr_err_code ndr_err;
ZERO_STRUCTP(*reg_entry);
@@ -120,8 +121,17 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx,
data->type = r->type;
- ndr_push_union_blob(&data->data, mem_ctx, &r->data, r->type,
- (ndr_push_flags_fn_t)ndr_push_winreg_Data);
+ ndr_err = ndr_push_union_blob(
+ &data->data,
+ mem_ctx,
+ &r->data,
+ r->type,
+ (ndr_push_flags_fn_t)ndr_push_winreg_Data);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ DBG_WARNING("ndr_push_winreg_Data failed: %s\n",
+ ndr_errstr(ndr_err));
+ return false;
+ }
entry = talloc_zero(mem_ctx, struct gp_registry_entry);
if (!entry)
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c
index fd7491d..fd567e9 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -607,8 +607,9 @@ WERROR dsdb_convert_object_ex(struct ldb_context *ldb,
}
} else {
if (!(instanceType & INSTANCE_TYPE_WRITE)) {
- DEBUG(0, ("Refusing to replicate %s from a read-only repilca into a read-write replica!\n",
- ldb_dn_get_linearized(msg->dn)));
+ DBG_ERR("Refusing to replicate %s from a read-only "
+ "replica into a read-write replica!\n",
+ ldb_dn_get_linearized(msg->dn));
return WERR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA;
}
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index c4a41a2..584fd21 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -4685,6 +4685,7 @@ static int replmd_make_prefix_child_dn(TALLOC_CTX *tmp_ctx,
{
struct ldb_val deleted_child_rdn_val;
struct GUID_txt_buf guid_str;
+ int ret;
bool retb;
GUID_buf_string(&guid, &guid_str);
@@ -4751,10 +4752,13 @@ static int replmd_make_prefix_child_dn(TALLOC_CTX *tmp_ctx,
sizeof(guid_str.buf));
/* Now set the value into the RDN, without parsing it */
- ldb_dn_set_component(dn, 0, rdn_name,
- deleted_child_rdn_val);
+ ret = ldb_dn_set_component(
+ dn,
+ 0,
+ rdn_name,
+ deleted_child_rdn_val);
- return LDB_SUCCESS;
+ return ret;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list