[PATCH] Fix winbind caching if no domain_name is set.
Andreas Schneider
asn at samba.org
Fri Apr 5 02:05:23 MDT 2013
On Thursday 04 April 2013 14:39:15 Jeremy Allison wrote:
> On Thu, Apr 04, 2013 at 03:21:51PM +0200, Andreas Schneider wrote:
> > This is an updated version.
> >
> > As we are here in the child the domain passed to the function should be
> > the
> > right one, but looking it up with find_domain_from_sid_noinit() is saver.
>
> Unfortunately this doesn't compile in master.
>
> I think this change:
> > @@ -1793,6 +1810,13 @@ NTSTATUS wcache_name_to_sid(struct winbindd_domain
> > *domain,>
> > return NT_STATUS_NO_MEMORY;
> >
> > }
> >
> > + if (domain_name[0] == '\0') {
> > + our_domain = find_our_domain();
> > + if (domain != NULL) {
> > + domain_name = our_domain->name;
> > + }
> > + }
> > +
>
> Should be:
> > @@ -1793,6 +1810,13 @@ NTSTATUS wcache_name_to_sid(struct winbindd_domain
> > *domain,>
> > return NT_STATUS_NO_MEMORY;
> >
> > }
> >
> > + if (domain_name[0] == '\0') {
> > + struct winbindd_domain *our_domain = find_our_domain();
> > + if (our_domain != NULL) {
> > + domain_name = our_domain->name;
> > + }
> > + }
> > +
>
> Can you confirm and resubmit ?
It was
+ if (domain_name[0] == '\0') {
+ domain_name = our_domain->name;
+ }
and should be
+ if (domain_name[0] == '\0') {
+ domain_name = domain->name;
+ }
Just a typo from the removal of find_our_domain.
We are in the child so it should be already the correct domain to look it up.
-- andreas
--
Andreas Schneider GPG-ID: F33E3FC6
Samba Team asn at samba.org
www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-BUG-9766-Cache-name_to_sid-sid_to_name-correctly.patch
Type: text/x-patch
Size: 1930 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130405/0cdd4bb9/attachment.bin>
More information about the samba-technical
mailing list