s4: Patch for "libnet/libnet_samsync_ldb.c"
jelmer at samba.org
Tue Dec 7 07:34:53 MST 2010
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:
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
More information about the samba-technical