The Samba-Bugzilla – Attachment 8816 Details for
Bug 9830
panic in nt_printer_publish_ads()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against v3-6-test, uses global_myname() instead of lp_netbios_name()
0001-bug-9830-fix-panic-in-nt_printer_publish_ads_36.patch (text/plain), 1.52 KB, created by
David Disseldorp
on 2013-04-25 15:53:34 UTC
(
hide
)
Description:
patch against v3-6-test, uses global_myname() instead of lp_netbios_name()
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2013-04-25 15:53:34 UTC
Size:
1.52 KB
patch
obsolete
>From b6ff3edd7a2b0ac8e056b9f4885d8f737a9267e7 Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Thu, 25 Apr 2013 16:01:54 +0200 >Subject: [PATCH] bug 9830: fix panic in nt_printer_publish_ads > >Check for ads_find_machine_acct() errors, to ensure a NULL LDAPMessage >pointer doesn't get passed to ldap_get_dn(). > >Signed-off-by: David Disseldorp <ddiss@samba.org> >--- > source3/printing/nt_printing_ads.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/source3/printing/nt_printing_ads.c b/source3/printing/nt_printing_ads.c >index c9381aa..572b541 100644 >--- a/source3/printing/nt_printing_ads.c >+++ b/source3/printing/nt_printing_ads.c >@@ -192,17 +192,23 @@ static WERROR nt_printer_publish_ads(struct messaging_context *msg_ctx, > DEBUG(5, ("publishing printer %s\n", printer)); > > /* figure out where to publish */ >- ads_find_machine_acct(ads, &res, global_myname()); >+ ads_rc = ads_find_machine_acct(ads, &res, global_myname()); >+ if (!ADS_ERR_OK(ads_rc)) { >+ DEBUG(0, ("failed to find machine account for %s\n", >+ global_myname())); >+ TALLOC_FREE(ctx); >+ return WERR_NOT_FOUND; >+ } > > /* We use ldap_get_dn here as we need the answer > * in utf8 to call ldap_explode_dn(). JRA. */ > > srv_dn_utf8 = ldap_get_dn((LDAP *)ads->ldap.ld, (LDAPMessage *)res); >+ ads_msgfree(ads, res); > if (!srv_dn_utf8) { > TALLOC_FREE(ctx); > return WERR_SERVER_UNAVAILABLE; > } >- ads_msgfree(ads, res); > srv_cn_utf8 = ldap_explode_dn(srv_dn_utf8, 1); > if (!srv_cn_utf8) { > TALLOC_FREE(ctx); >-- >1.8.1.4 >
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:
ddiss
:
review?
(
gd
)
asn
:
review+
Actions:
View
Attachments on
bug 9830
:
8815
| 8816