r20242?
simo
idra at samba.org
Tue Dec 19 13:09:11 GMT 2006
On Tue, 2006-12-19 at 10:47 +0100, Volker Lendecke wrote:
> Hi, Simo!
>
> --- nsswitch/wb_client.c (Revision 20241)
> +++ nsswitch/wb_client.c (Revision 20242)
> @@ -65,7 +65,7 @@
> /* Call winbindd to convert sid to name */
>
> BOOL winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
> - const char **domain, const char **name,
> + char **domain, char **name, enum lsa_SidType *name_type)
> {
> struct winbindd_request request;
>
> Are you certain that this change is correct? It leads to two
> warnings in lookup_sid.c. Changing the "const char *domain"
> to "char *domain" leads to even more warnings, as for
> example lookup_wellknown_name gets its domain from a static
> string.
>
> Why do you want that not to be const? In what circumstances
> do you want to modify the strings returned from
> winbind_lookup_sid? So far we have done quite well without
> it.
As we allocate them inside winbind_lookup_sid() I thought it to be
misleading to mark them as const. I don't plan to modify them, but if in
future someone does I'd thought that would prevent someone to just
blindly strdup them, it would be a waste.
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org
More information about the samba-technical
mailing list