[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Thu Mar 11 22:51:01 UTC 2021
The branch, master has been updated
via 11f3c852c75 s4:libnet_rpc: avoid reusing the assoc_group_id of the lsa connection
via 46e6f6ef843 ldb: correct comments in attrib_handers val_to_int64
via f67f95f009a util:str_sub: talloc_free on error
via c45e0896107 util: don't mark impure functions as pure
from 6686db1132b samba-tool gpo: add missing newline to admxload warning
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 11f3c852c75035986de745a91686e83c1d36bb3e
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Mar 11 15:27:01 2021 +0100
s4:libnet_rpc: avoid reusing the assoc_group_id of the lsa connection
This was an unexpected side effect introduced in commit
1b17d9a587bf3600d449c2481fe1191793479e32.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Mar 11 22:50:02 UTC 2021 on sn-devel-184
commit 46e6f6ef8436df7e083f34556c25f66f65ea1ce5
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Sat Mar 6 09:57:44 2021 +1300
ldb: correct comments in attrib_handers val_to_int64
c.f. the identical static function in lib/ldb-samba/ldif_handlers.c
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit f67f95f009a417aca2c636e4a6d17fa87325813e
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Mar 10 22:13:48 2021 +1300
util:str_sub: talloc_free on error
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c45e0896107ad1097b5cf76d8a60968320a7a737
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Mar 10 22:05:37 2021 +1300
util: don't mark impure functions as pure
nothing that allocates memory can be pure, unless it guarantees to
allocate exactly the same pointer very time (which it does not).
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/common/attrib_handlers.c | 4 +---
lib/util/samba_util.h | 4 ++--
lib/util/substitute.c | 1 +
lib/util/util.c | 4 ++--
source4/libnet/libnet_rpc.c | 6 ++++++
5 files changed, 12 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ldb/common/attrib_handlers.c b/lib/ldb/common/attrib_handlers.c
index b5212b73159..11921ca429c 100644
--- a/lib/ldb/common/attrib_handlers.c
+++ b/lib/ldb/common/attrib_handlers.c
@@ -100,7 +100,7 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx,
return 0;
}
-/* length limited conversion of a ldb_val to a int32_t */
+/* length limited conversion of a ldb_val to an int64_t */
static int val_to_int64(const struct ldb_val *in, int64_t *v)
{
char *end;
@@ -113,8 +113,6 @@ static int val_to_int64(const struct ldb_val *in, int64_t *v)
strncpy(buf, (char *)in->data, in->length);
buf[in->length] = 0;
- /* We've to use "strtoll" here to have the intended overflows.
- * Otherwise we may get "LONG_MAX" and the conversion is wrong. */
*v = (int64_t) strtoll(buf, &end, 0);
if (*end != 0) {
return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index f0bfa809d7b..4e279b72df1 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -237,12 +237,12 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t
/**
* Parse a hex string and return a data blob.
*/
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
+_PUBLIC_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
/**
* Parse a hex dump and return a data blob
*/
-_PUBLIC_ _PURE_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t len);
+_PUBLIC_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t len);
/**
* Print a buf in hex. Assumes dst is at least (srclen*2)+1 large.
diff --git a/lib/util/substitute.c b/lib/util/substitute.c
index 3ca53d912c4..b7b5588da86 100644
--- a/lib/util/substitute.c
+++ b/lib/util/substitute.c
@@ -194,6 +194,7 @@ char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
in = talloc_strdup(mem_ctx, insert);
if (!in) {
DEBUG(0, ("talloc_string_sub2: ENOMEM\n"));
+ talloc_free(string);
return NULL;
}
ls = (ssize_t)strlen(s);
diff --git a/lib/util/util.c b/lib/util/util.c
index 57f19aaa1a1..7d7fb91e875 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -900,7 +900,7 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t
/**
* Parse a hex string and return a data blob.
*/
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
+_PUBLIC_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
{
DATA_BLOB ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
@@ -916,7 +916,7 @@ _PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *s
* is generated from dump_data_cb() elsewhere in this file
*
*/
-_PUBLIC_ _PURE_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t hexdump_len)
+_PUBLIC_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t hexdump_len)
{
DATA_BLOB ret_blob = { 0 };
size_t i = 0;
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index a491a427ddc..91c538fa58c 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -791,6 +791,12 @@ static void continue_epm_map_binding_send(struct composite_context *c)
s->final_binding = dcerpc_binding_dup(s, s->lsa_pipe->binding);
if (composite_nomem(s->final_binding, c)) return;
+ /*
+ * We don't want to inherit the assoc_group_id from the
+ * lsa_pipe here!
+ */
+ dcerpc_binding_set_assoc_group_id(s->final_binding, 0);
+
epm_creds = cli_credentials_init_anon(s);
if (composite_nomem(epm_creds, c)) return;
--
Samba Shared Repository
More information about the samba-cvs
mailing list