The Samba-Bugzilla – Attachment 15846 Details for
Bug 14264
"net sam listmem Administrators" leads to PANIC: Bad talloc magic value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.12, 4.11 and 4.10
0001-Remove-unnecessary-incorrect-talloc_steal-calls.patch (text/plain), 2.14 KB, created by
Andreas Schneider
on 2020-03-06 17:11:04 UTC
(
hide
)
Description:
patch for 4.12, 4.11 and 4.10
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2020-03-06 17:11:04 UTC
Size:
2.14 KB
patch
obsolete
>From 5e92d08360f43d74fa3161fbf1041a188add0834 Mon Sep 17 00:00:00 2001 >From: Jonathon Reinhart <Jonathon.Reinhart@gmail.com> >Date: Wed, 5 Feb 2020 00:25:36 -0500 >Subject: [PATCH] Remove unnecessary/incorrect talloc_steal() calls > >The talloc_steal() in dsdb_enum_group_mem() is unnecessary, because >members was already allocated from the same mem_ctx. > >The talloc_steal() in pdb_samba_dsdb_enum_aliasmem() is also unnecessary >for the same reason, but also incorrect, because it should be >dereferencing pmembers: > > talloc_steal(mem_ctx, *pmembers); > >Furthermore, we should only assign to *pnum_members on success; otherwise >num_members is used uninitialized. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14264 > >Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com> >Reviewed-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> > >Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> >Autobuild-Date(master): Thu Mar 5 18:40:16 UTC 2020 on sn-devel-184 > >(cherry picked from commit a4ed6ada500c3ee7ef8b5e43998968627121f255) >--- > source3/passdb/pdb_samba_dsdb.c | 3 +-- > source4/dsdb/common/util_samr.c | 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > >diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c >index 351881722e6..c5f8d479fb6 100644 >--- a/source3/passdb/pdb_samba_dsdb.c >+++ b/source3/passdb/pdb_samba_dsdb.c >@@ -1752,9 +1752,8 @@ static NTSTATUS pdb_samba_dsdb_enum_aliasmem(struct pdb_methods *m, > } > > status = dsdb_enum_group_mem(state->ldb, mem_ctx, dn, pmembers, &num_members); >- *pnum_members = num_members; > if (NT_STATUS_IS_OK(status)) { >- talloc_steal(mem_ctx, pmembers); >+ *pnum_members = num_members; > } > talloc_free(tmp_ctx); > return status; >diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c >index 5370fc94eba..89339c109d0 100644 >--- a/source4/dsdb/common/util_samr.c >+++ b/source4/dsdb/common/util_samr.c >@@ -495,7 +495,7 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb, > ++j; > } > >- *members_out = talloc_steal(mem_ctx, members); >+ *members_out = members; > *pnum_members = j; > talloc_free(tmp_ctx); > return NT_STATUS_OK; >-- >2.25.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review?
(
gd
)
Actions:
View
Attachments on
bug 14264
:
15773
| 15846