Managing DNs in libads only in utf8

simo idra at samba.org
Tue Feb 27 15:50:43 GMT 2007


On Tue, 2007-02-27 at 10:43 -0500, simo wrote:
> On Tue, 2007-02-27 at 16:29 +0100, Volker Lendecke wrote:
> > On Tue, Feb 27, 2007 at 10:21:10AM -0500, simo wrote:
> > > No elefant gun, I did the job of checking every single use of a DN
> > > coming out from libads in less then 6 hours while also changing the
> > > code. Changing the DN to a struct will make checking for it much easier
> > > as the compiler will help find out every single inconsistency that I may
> > > miss by just manually checking.
> > 
> > Did you try to compile that patch? I get
> > 
> > Compiling printing/nt_printing.c
> > printing/nt_printing.c: In function ‘nt_printer_publish_ads’:
> > printing/nt_printing.c:3070: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘char **’
> > Compiling libads/ldap.c
> > libads/ldap.c: In function ‘ads_get_dn’:
> > libads/ldap.c:988: error: ‘__ERROR_DONT_USE_STRDUP_DIRECTLY’ undeclared (first use in this function)
> > libads/ldap.c:988: error: (Each undeclared identifier is reported only once
> > libads/ldap.c:988: error: for each function it appears in.)
> 
> Yes, but not with --enable-developer now that I look at that.
> The nt_printing.c warning was there before however.
> I'll change strdup() -> SMB_STRDUP()

Attached patch should work, however if we decide to go the struct {}
way, this patch is not so important (as I said I compiled it but not
tested it as I wanted input before committing myself too much for
something that could be rejected).

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba3_libads_utf8_dns.patch
Type: text/x-patch
Size: 12841 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070227/704b4cca/samba3_libads_utf8_dns.bin


More information about the samba-technical mailing list