patch for pdb_ldap.c (

Markus Schabel markus.schabel at
Fri Jul 5 04:47:02 GMT 2002

----- Original Message -----
From: "Simo Sorce" <idra at>
To: "Markus Schabel" <markus.schabel at>
Cc: "Samba Technical" <samba-technical at>
Sent: Friday, July 05, 2002 1:34 PM
Subject: Re: patch for pdb_ldap.c (

> On Fri, 2002-07-05 at 11:38, Markus Schabel wrote:
> > Yes, my fault. I thought the len is for parameter #3, but it actually is for
> > parameter #5 (start counting with 1)
> > so for example strlen(homedir) instead of sizeof(homedir) should work? At
> > I'll try this...
> Markus, it really depends.
> You do not want to put strlen(string) as you would have absolutely no
> room for expansion.
> Using pstrings, fixed size (1024) strings, you can easily put
> sizeof(pstring) (==1024) and you have room to grow until 1024 bytes.

I think there was somethin I missunderstood. thx for explaining this

> Instead when we change to allocated strings, we are forced to make a new
> set of substitution functions that will realloc strings as needed.
> I will take the issue to do that asap, as I'm a strong supporter of
> allocated strings against pstrings.

My fault was, that I thougt this was already done...

> I will code up in days (if I have time of course) a series of
> alloc_substitute...() functions that will acccept a string in input and
> return a new allocated string as output.

I'll spend my time to try samba running as pdc with ldap-backend. Simply doesn't
work for me (with 2.2.5 and SAMBA_2_2). I think there are not very much people
who test this.....


> Simo.
> --
> Simo Sorce
> ----------
> Una scelta di liberta': Software Libero.
> A choice of freedom: Free Software.

More information about the samba-technical mailing list