3.0.25 wbinfo bug

Herb Lewis hlewis at panasas.com
Thu Feb 15 20:25:31 GMT 2007

The wbinfo command -R or --lookup-rids is very broken
and you currently get a segfault. The function
wbinfo_lookuprids is expecting the args to be the
domain sid (as a string) and the rids. However it
is using the domain_name option string as the first
argument. If you specify the --domain and give it
a domain sid instead of the domain name then the
command works.

This could be fixed by fixing the documentation
(and putting a test for NULL on the 1st argument
to prevent the segv) or we can do a more complicated
fix and query winbindd for the domain sid with the
following code to get the proper domain name (like we use
in other functions)

         if ((domain == NULL) || (strequal(domain, ".")) || (domain[0] 
== '\0'))
                 fstrcpy(request.domain_name, get_winbind_domain());
                 fstrcpy(request.domain_name, domain);

Any preferences as to which fix we would like?

More information about the samba-technical mailing list