[PATCH 2/7] ldb:ldbdel tool - use LDB result constants for consistency

simo idra at samba.org
Mon Jan 17 14:52:08 MST 2011


On Mon, 2011-01-17 at 22:45 +0100, Matthias Dieter Wallnöfer wrote:
>         ret = ldb_search(ldb, ldb, &res, dn, LDB_SCOPE_SUBTREE, attrs,
> "distinguishedName=*");
> -       if (ret != LDB_SUCCESS) return -1;
> +       if (ret != LDB_SUCCESS) return ret;
>   

The return code from ldb_delete_recursive() is returned directly to main
and from there to the userspace that called ldbdel

This patch would change the return error codes of the ldbdel tool.

I am not sure it is a good idea.

In general tool do not return LDB_ERR_*/LDB_SUCCESS on purpose, as they
return internal utility error codes to be returned to the user space.

What do we gain with these patches ?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list