Bug 7834 - Domain name is missing in response to the WINBINDD_LOOKUPRIDS request (with patch)
Summary: Domain name is missing in response to the WINBINDD_LOOKUPRIDS request (with p...
Status: RESOLVED DUPLICATE of bug 7842
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.5.6
Hardware: x64 FreeBSD
: P3 normal
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 07:41 UTC by Andriy Syrovenko
Modified: 2010-12-07 10:35 UTC (History)
0 users

See Also:


Attachments
Patch (817 bytes, patch)
2010-12-01 07:44 UTC, Andriy Syrovenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Syrovenko 2010-12-01 07:41:48 UTC
While processing WINBINDD_LOOKUPRIDS request the winbindd does not fill the domain_name field in response structure. Consequently smbd returns an empty domain name while looking up SIDs, which in turn causes Security Properties dialog on Windows to behave oddly.
Comment 1 Andriy Syrovenko 2010-12-01 07:42:49 UTC
The following patch fixes the problem for me:

--- samba-3.5.6.orig/source3/winbindd/winbindd_lookuprids.c	2010-10-07 19:41:16.000000000 +0300
+++ samba-3.5.6/source3/winbindd/winbindd_lookuprids.c	2010-11-29 10:57:07.319026719 +0200
@@ -64,14 +64,15 @@
 	domain = find_domain_from_sid_noinit(&sid);
 	if (domain == NULL) {
 		DEBUG(5, ("Domain for sid %s not found\n",
 			  sid_string_dbg(&sid)));
 		tevent_req_nterror(req, NT_STATUS_NO_SUCH_DOMAIN);
 		return tevent_req_post(req, ev);
 	}
+	state->domain_name = domain->name;
 
 	if (request->extra_data.data[request->extra_len-1] != '\0') {
 		DEBUG(5, ("extra_data not 0-terminated\n"));
 		tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
 		return tevent_req_post(req, ev);
 	}
Comment 2 Andriy Syrovenko 2010-12-01 07:44:44 UTC
Created attachment 6096 [details]
Patch
Comment 3 Michael Adam 2010-12-06 16:40:13 UTC
This seems to be a duplicate of bug #7842,
for which a patch has already been provided and reviewed.
Sorry that your bugreport slipped our attention.

Your patch is much simpler than the patch of bug #7842,
but this is (partly) due to the fact that it relies on a bug
in the context code, bug #7841, which has also been fixed
just before.

Could you try the patches of bugs #7841 and #7842 and check
if they also improve the situation for you?

Thanks - Michael


*** This bug has been marked as a duplicate of bug 7842 ***
Comment 4 Andriy Syrovenko 2010-12-07 10:27:49 UTC
I have checked the patches of bugs #7841 and #7842. Applying both of them fixed the problem for me. Thanks.
Comment 5 Michael Adam 2010-12-07 10:35:39 UTC
Thanks for testing and for the feed-back!