Bug 9367 - Use work around for 'winbind use default domain' only if it is set
Summary: Use work around for 'winbind use default domain' only if it is set
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.0 beta4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 13:57 UTC by Sumit Bose
Modified: 2012-12-03 10:15 UTC (History)
0 users

See Also:


Attachments
Patch for the ticket (1.88 KB, patch)
2012-11-07 14:03 UTC, Sumit Bose
asn: review+
sumit.k.bose: review? (gd)
ab: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sumit Bose 2012-11-07 13:57:22 UTC
Currently in smb_getpwnam() the NetBIOS domain name and the winbind separator
character is always added to the user name returned by Get_Pwnam_alloc() if it
does not contain the winbind separator character. As comments in the code
indicates this is done as a work around if 'winbind use default domain' is set
to yes in the samba configuration.

This make sense if the option is set because otherwise the domain information is
lost from the user name. But it causes errors if other services than winbind are
used for user lookup, e.g. sssd. sssd can handle different kind of fully
qualified user names as input, e.g. user@domain.name or DOM\user, but returns a
canonical name, by default user@domain.name.

While it would be possible to get around this issue with a special configuration
either on the sssd or samba side I think the cleaner solution is to use the work
around only if 'winbind use default domain' is set to yes which is what this
patch does.
Comment 1 Sumit Bose 2012-11-07 14:03:57 UTC
Created attachment 8164 [details]
Patch for the ticket
Comment 2 Andreas Schneider 2012-11-12 11:36:35 UTC
Comment on attachment 8164 [details]
Patch for the ticket

Looks good to me.
Comment 3 Alexander Bokovoy 2012-11-12 11:40:11 UTC
Comment on attachment 8164 [details]
Patch for the ticket

Yes, looks good to me too.
Comment 4 Andreas Schneider 2012-11-12 13:03:20 UTC
Pushed to autobuild. Karolin please add to v4-0-test.
Comment 5 Karolin Seeger 2012-11-13 08:50:18 UTC
Pushed to autobuild-v4-0-test.
Comment 6 Karolin Seeger 2012-11-13 10:43:08 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!
Comment 7 Andreas Schneider 2012-11-30 15:02:39 UTC
Karolin, could you please add the patch to v3-6-test too. It applies cleanly. Thanks!
Comment 8 Karolin Seeger 2012-12-03 10:15:05 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!