Bug 9929 - s4:winbind: don't leak libnet_context into the main event context
Summary: s4:winbind: don't leak libnet_context into the main event context
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Winbind (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-05 09:32 UTC by Björn Baumbach
Modified: 2013-06-06 18:51 UTC (History)
1 user (show)

See Also:


Attachments
proposed patch, cherry-picked from master (2.06 KB, patch)
2013-06-05 09:36 UTC, Björn Baumbach
abartlet: review+
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2013-06-05 09:32:56 UTC
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.

Patch is in master 097a8c723925d3e35606215cb16be28a37b0112e
Comment 1 Björn Baumbach 2013-06-05 09:36:20 UTC
Created attachment 8943 [details]
proposed patch, cherry-picked from master
Comment 2 Karolin Seeger 2013-06-05 10:05:33 UTC
Pushed to autobuild-v4-0-test.
Comment 3 Karolin Seeger 2013-06-06 18:51:11 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!