Managing DNs in libads only in utf8

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Feb 27 14:02:41 GMT 2007

On Tue, Feb 27, 2007 at 08:54:29AM -0500, simo wrote:
> I proposed "#define smb_utf8_t char" in another mail, but I like your
> proposal as well, even more.
> If everybody agrees I will proceed in converting the code to use
> something like:
> #typedef struct { char * dn } smb_utf8_dn;
> This should make it really hard to leak any utf8 string by mistake, and
> should keep everybody happy the boundary is very well defined.

Have you seen my second mail, with the start of a patch?

Two things with "typedef struct { char * dn } smb_utf8_dn;": 

First, it makes it necessary to allocate two talloc contexts
per string, with twice the overhead. If we have many
strings, this might be significant and I would like to avoid
it if it is easily possible.

Second, why the typedef? And, why do you restrict its name to
"_dn"? I could imagine other uses than just the LDAP DNs.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list