s4: Patch for "libnet/libnet_samsync_ldb.c"

Jelmer Vernooij jelmer at samba.org
Tue Dec 7 07:34:53 MST 2010


Hi Matthias,

On Tue, 2010-12-07 at 15:13 +0100, Matthias Dieter Wallnöfer wrote:
> while thinking about the substitution of "samdb_msg_add_string" (other 
> thread) I've come across on the "libnet/libnet_samsync_ldb.c" file. 
> Briefly said there exist many "samdb/ldb_msg_add" calls without return 
> code checks. To solve the issue I've written the following patch: 
> http://repo.or.cz/w/Samba/mdw.git/commitdiff/33d56971b23e8124563827cdc0bafb1a02060d1d 
> and wanted to know what you think about my macro approach. Probably it 
> could be worth to move the macro to a common location.
I think we need a custom function that converts a ldb error to a
NTSTATUS variable, if we don't have one already. Perhaps a
ldb_error_to_ntstatus() function, living in lib/ldb-samba ?

You're currently assuming that if a samdb_msg_add_string() call fails
that this means a memory allocation error. We should support other
values as well. 

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101207/12fbc965/attachment.pgp>


More information about the samba-technical mailing list