svn commit: samba r13278 - in branches/SAMBA_4_0/source/lib/ldb/common: .

simo idra at samba.org
Fri Feb 3 15:53:04 GMT 2006


On Fri, 2006-02-03 at 02:06 -0500, simo wrote:
> again but with the right address for the ldb list. :-/
> 
> On Fri, 2006-02-03 at 10:22 +1100, tridge at samba.org wrote:
> > Simo,
> > 
> >  > Uhmm would it be enough to be able to pass in the tables?
> > 
> > Then each application would have to agree on the format of those
> > tables. There is no obvious standard format (or at least not a compact
> > one) and what is suitable for Samba may not be suitable for other
> > projects.
> > 
> > Passing in a single function pointer seems much simpler to me than
> > trying to create a standard, compact format for case tables.
> 
> I just tried to convert the code we have to use the function you
> proposed.
> The problem is that this change requires a chain of changes because of
> the necessity to pass in an ldb context. Actually some of the functions
> (ldb_dn_canonical_string for example) are used outside ldb and the
> functions calling them do not have any ldb context to pass in.
> 
> Also all the functions under ldb_msg.c and ldb_parse.c and probably
> others would require to have an ldb context as they use ldb_attr_cmp
> which in turn uses ldb_caseless_cmp. And in cascade all the functions
> that use the functions defined there.
> 
> The biggest concern for me is not about changing all the code, with the
> help of the compiler it is easy to find out all the places that need to
> be changed. The problem is the fact that it will become impossible to
> use any function without an ldb_context and it does also out a lot of
> trouble on the shoulders of the casual programmer that will need to
> provide it's own set of utf8 functions.
> 
> One solution can be to import the samba code that deal with this into
> ldb, or to use another publicly available API.
> 
> What do you think ?

Replying myself and reconnecting to the topic of attribute name
restrictions. By adopting rfc2251 restriction on attribute names we
solve most of this problem, as we can simply use strcasecmp() as the
only valid chars in an attribute name are ascii7 limited letters,
digitis and hyphens. And the name cannot start with a digit.

I'll take the ball and enforce this in ldb now so that we can solve the
ldb_attr_cmp problem too.

Simo.

-- 
Simo Sorce
Samba Team
email: idra at samba.org
http://samba.org/~idra



More information about the samba-technical mailing list