[PATCH] Fix winbind caching if no domain_name is set.

Jeremy Allison jra at samba.org
Thu Apr 4 15:39:15 MDT 2013


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 ?

Cheers,

	Jeremy.


More information about the samba-technical mailing list