s4: Patch for "libnet/libnet_samsync_ldb.c"

Andrew Bartlett abartlet at samba.org
Thu Dec 16 04:57:38 MST 2010

On Thu, 2010-12-16 at 10:09 +0100, Matthias Dieter Wallnöfer wrote:
> Hi Jelmer,
> it's problematic since these "samdb_msg_*" calls are in use by some LDB 
> modules (rootdse, samldb, instancetype) and these expect to have LDAP 
> error codes returned.
> For callers beside these it could make sense that the result code is 
> changed to NTSTATUS since they itself often return exactly this type.
> All in all I don't think that it's clear which solution is better than 
> the other one, but I've thought about another idea: in 
> "ldb_msg_add_value" we make also use of the "errno" variable if we run 
> into a OOM. What would be if we enhance this and use it for 
> distinguishing between a generic and a OOM error in the LDAP error -> 
> NTSTATUS mapping function?

It was a good day when we added proper error codes to ldb, and stopped
using errno.  It would be highly unfortunate to start using it again.

Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.

More information about the samba-technical mailing list