The Samba-Bugzilla – Attachment 8943 Details for
Bug 9929
s4:winbind: don't leak libnet_context into the main event context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch, cherry-picked from master
0001-s4-winbind-don-t-leak-libnet_context-into-the-main-e.patch (text/plain), 2.06 KB, created by
Björn Baumbach
on 2013-06-05 09:36:20 UTC
(
hide
)
Description:
proposed patch, cherry-picked from master
Filename:
MIME Type:
Creator:
Björn Baumbach
Created:
2013-06-05 09:36:20 UTC
Size:
2.06 KB
patch
obsolete
>From 461eb2fa93e4745e80cc95dc9843334b4df9032b Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Fri, 31 May 2013 16:04:26 +0200 >Subject: [PATCH] s4:winbind: don't leak libnet_context into the main event > context (bug #9929) > >This needs to be a talloc child of struct wbsrv_domain >otherwise the cleanup of a broken connection doesn't work. > >The following command can trigger the leak on a domain controller. > >root@dc:~/samba# ls -l /var/lib/samba/sysvol/samba.private/ >total 16 >drwxrwx---+ 5 root 3000000 4096 May 14 14:46 Policies >drwxrwx---+ 2 root 3000000 4096 May 14 11:45 scripts > >gid 3000000 belongs to Builtin\Administrators. > >The code triggers a ncacn_np: connection to the local smbd >and complains that domain BUILTIN is not available: > >[2013/05/29 17:28:03, 2] ../source4/winbind/wb_init_domain.c:376(init_domain_recv_queryinfo) > Expected domain name BUILTIN, DC dc.samba.private said SAMBA > >In that case the connection was not closed, which is fixed by this commit. > >Using ncalrpc: for all local SIDs and serving the BUILTIN domain is >a project for another day... > >Signed-off-by: Stefan Metzmacher <metze@samba.org> > >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Tue Jun 4 11:05:09 CEST 2013 on sn-devel-104 >(cherry picked from commit 097a8c723925d3e35606215cb16be28a37b0112e) >--- > source4/winbind/wb_init_domain.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c >index 5e2aa47..70dbaa9 100644 >--- a/source4/winbind/wb_init_domain.c >+++ b/source4/winbind/wb_init_domain.c >@@ -144,6 +144,8 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx, > > state->domain->libnet_ctx = libnet_context_init(service->task->event_ctx, > service->task->lp_ctx); >+ if (state->domain->libnet_ctx == NULL) goto failed; >+ talloc_steal(state->domain, state->domain->libnet_ctx); > > /* Create a credentials structure */ > state->domain->libnet_ctx->cred = cli_credentials_init(state->domain); >-- >1.8.1.5 >
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:
abartlet
:
review+
metze
:
review+
Actions:
View
Attachments on
bug 9929
: 8943