[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Sun Oct 18 10:19:49 MDT 2009
Thanks Simo for spotting this. I misinterpreted the result values.
Now it should be okay.
Matthias
--- simo <idra at samba.org> schrieb am So, 18.10.2009:
Von: simo <idra at samba.org>
Betreff: Re: [SCM] Samba Shared Repository - branch master updated
An: samba-technical at lists.samba.org
Datum: Sonntag, 18. Oktober 2009, 16:19
On Sun, 2009-10-18 at 03:46 -0500, Matthias Dieter Wallnöfer wrote:
> The branch, master has been updated
> via 56a8baf... s4:ldb_msg - Use LDB constants on results
> via a69f84f... s4:ldb_ldap - Fix intendation
> from bc2b419... s4-test: the ldap secdesc test is expected to fail for now
>
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
>
>
> - Log -----------------------------------------------------------------
> commit 56a8baff3df6a5120b6c7bbca771dfb7c6934fd5
> Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
> Date: Sat Oct 17 22:26:41 2009 +0200
>
> s4:ldb_msg - Use LDB constants on results
>
> commit a69f84fd2a4e410dffdca8b8ba08f803d3d07de6
> Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
> Date: Sat Oct 17 22:27:42 2009 +0200
>
> s4:ldb_ldap - Fix intendation
>
> -----------------------------------------------------------------------
>
> Summary of changes:
> source4/lib/ldb/common/ldb_msg.c | 12 +++++++-----
> source4/lib/ldb/ldb_ldap/ldb_ldap.c | 16 ++++++++--------
> 2 files changed, 15 insertions(+), 13 deletions(-)
>
>
> Changeset truncated at 500 lines:
>
> diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
> index 929f24c..0917325 100644
> --- a/source4/lib/ldb/common/ldb_msg.c
> +++ b/source4/lib/ldb/common/ldb_msg.c
> @@ -896,14 +896,16 @@ int ldb_msg_check_string_attribute(const struct ldb_message *msg, const char *na
> struct ldb_val val;
>
> el = ldb_msg_find_element(msg, name);
> - if (el == NULL)
> - return 0;
> + if (el == NULL) {
> + return LDB_SUCCESS;
> + }
>
> val.data = discard_const_p(uint8_t, value);
> val.length = strlen(value);
>
> - if (ldb_msg_find_val(el, &val))
> - return 1;
> + if (ldb_msg_find_val(el, &val)) {
> + return LDB_ERR_OPERATIONS_ERROR;
> + }
>
> - return 0;
> + return LDB_SUCCESS;
Mathias,
ldb_msg_check_string_attribute() is used in a few places with the
expectation that the return is 0 or 1, please either fix these places as
well or revert this change.
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