The Samba-Bugzilla – Attachment 17907 Details for
Bug 15384
net ads lookup (with unspecified realm) fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
backport for 4.18
v4.18-s3-utils-avoid-erronous-NO-MEMORY-detection.patch (text/plain), 1.50 KB, created by
Noel Power
on 2023-06-06 08:55:02 UTC
(
hide
)
Description:
backport for 4.18
Filename:
MIME Type:
Creator:
Noel Power
Created:
2023-06-06 08:55:02 UTC
Size:
1.50 KB
patch
obsolete
>From 99ffff588f1bb4e012bf280ee7175dafa813fc6f Mon Sep 17 00:00:00 2001 >From: Noel Power <noel.power@suse.com> >Date: Fri, 2 Jun 2023 14:27:55 +0100 >Subject: [PATCH] s3/utils: avoid erronous NO MEMORY detection > >since 5cc3c1b5f6b0289f91c01b20989558badc28fd61 if we don't have >a realm specified either on cmdline or in conf file we try to >copy (talloc_strdup) a NULL variable which triggers a NO_MEMORY >error when we check the result of the copy > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15384 > >Signed-off-by: Noel Power <noel.power@suse.com> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Sun Jun 4 12:42:16 UTC 2023 on atb-devel-224 > >(cherry picked from commit 22ab42c1007775abca0b578744d4c18a85cda627) >--- > source3/utils/net_ads.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c >index 9ec884394eb..ff56d7f76e2 100644 >--- a/source3/utils/net_ads.c >+++ b/source3/utils/net_ads.c >@@ -713,10 +713,12 @@ retry: > } else if (ads->auth.realm == NULL) { > const char *c_realm = cli_credentials_get_realm(c->creds); > >- ads->auth.realm = talloc_strdup(ads, c_realm); >- if (ads->auth.realm == NULL) { >- TALLOC_FREE(ads); >- return ADS_ERROR(LDAP_NO_MEMORY); >+ if (c_realm != NULL) { >+ ads->auth.realm = talloc_strdup(ads, c_realm); >+ if (ads->auth.realm == NULL) { >+ TALLOC_FREE(ads); >+ return ADS_ERROR(LDAP_NO_MEMORY); >+ } > } > } > >-- >2.35.3 >
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:
npower
:
review?
(
metze
)
asn
:
review+
Actions:
View
Attachments on
bug 15384
: 17907