svn commit: samba r18875 - in branches/SAMBA_3_0/source/groupdb: .

simo idra at samba.org
Mon Sep 25 02:55:09 GMT 2006


On Mon, 2006-09-25 at 10:32 +1000, tridge at samba.org wrote:
> Andrew,
> 
>  > LDAP doesn't support empty attributes.  Is there anything in particular
>  > wrong with not having the attribute at all?
> 
> in the database, its no problem not having the attribute. I was more
> thinking about the API we offer. Having to worry about the difference
> between an empty string and a non-empty string clutters code, and will
> inevitably lead to bugs where our test cases don't test a empty
> string.

I think we could allow empty strings when using tdb, but then we would
be incompatible with ldap. 

>  > I think Volker's change is correct.
> 
> yes, I now think with the current ldb API it is correct. I just wonder
> if we should make it easier to get it right, so we don't need special
> case code.
> 
> as ldb_msg_add_string() is not part of the ldap API, how about we make
> it silently not add an attribute if its empty? I wonder if that would
> break any usage?

I never really liked ldb_msg_sanity_check() either but I don't think we
should be silently removing attributes, we may hide a real bug that way.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list