s4: Patch for "libnet/libnet_samsync_ldb.c"

Jelmer Vernooij jelmer at samba.org
Tue Dec 7 07:59:41 MST 2010


On Tue, 2010-12-07 at 15:44 +0100, Matthias Dieter Wallnöfer wrote:
> is "lib/ldb-samba" better than "dsdb/common/util.c"?
It depends on what the function does exactly. If it's a generic mapping
function for ldb to NTSTATUS errors then I think lib/ldb-samba is more
appropriate. We don't want other non-dsdb code that uses it to have to
link against dsdb/.

> Regarding the other return values beside ERR_OPERATIONS_ERROR for out of 
> memory it's not so easy. Caller functions differ in behaviour regarding 
> NTSTATUS results - so I really thought it only to be used by msg_add* 
> calls and not for "ldb_add", "ldb_modify" ecc.
Considering that, perhaps it would make more sense for the
samdb_msg_add_* functions to return a NTSTATUS value directly?

Cheers,

Jelmer

> Jelmer Vernooij wrote:
> > Hi Matthias,
> > 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/aa9791ab/attachment.pgp>


More information about the samba-technical mailing list