[patch] ldb_msg_add_string()

simo idra at samba.org
Mon Sep 25 22:46:10 GMT 2006

On Mon, 2006-09-25 at 15:28 +1000, tridge at samba.org wrote:
> Simo,
>  > well actually I am more concerned about things like:
>  > 
>  >    ldb_msg_add_empty(ldb, "comment", LDB_FLAG_MOD_REPLACE);
>  > 
>  > and then forgetting to really set the new value.
> that's true, but it's not relevant for my patch :-)


> If you do the above, and forget to set the value, then the check in
> ldb_msg_sanity_check() will still kick in. I'm not proposing to change
> that check, I'm just proposing to apply exactly the patch I posted
> (the change to ldb_msg_add_string()).

Ah ok, I thought you proposed to remove that check in addition to the

>  > See the ldb_msg_add_empty() example.
> lets see if you can find another example :-)
>  > I have to think about this, maybe we can silently discard an empty
>  > attribute but give out a level 0 debug error.
>  > That might be a good enough compromise.
> hmmm, no, I don't think thats a good idea.
> Maybe you could look at my patch again? Perhaps you didn't notice that
> it doesn't actually add an empty attribute to the message?

Ok, I think the patch make sense.
I still think we should give a warning somewhere, however.


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

More information about the samba-technical mailing list