[SCM] Samba Shared Repository - branch master updated -
eba7f1032d79fe5dcbc1902e3af1087399f67a5a
Jelmer Vernooij
jelmer at samba.org
Wed Sep 24 18:14:41 GMT 2008
The branch, master has been updated
via eba7f1032d79fe5dcbc1902e3af1087399f67a5a (commit)
via b39b6099a44ef40fc79fc68c9df740e0ef722d19 (commit)
via 79854dc48a6f5448e4a435261ad2d9e9a2bbc712 (commit)
via 57edd24ca0fd91ae4d967666dc381147654e27f7 (commit)
via 9d849c30bc5dfb4c3b27639c52ba8c2a54d07471 (commit)
via 9261fa997ccda8f89556b644ddd45cd86919ec2e (commit)
via cf1935817fce0d6c7f4d2797c18f8c116220abd4 (commit)
from 9cf1a68977d56d342ca7dbe8f07c725221dc1148 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit eba7f1032d79fe5dcbc1902e3af1087399f67a5a
Merge: b39b6099a44ef40fc79fc68c9df740e0ef722d19 9cf1a68977d56d342ca7dbe8f07c725221dc1148
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Sep 24 20:14:17 2008 +0200
Merge branch 'master' of ssh://git.samba.org/data/git/samba
commit b39b6099a44ef40fc79fc68c9df740e0ef722d19
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Tue Sep 9 17:37:33 2008 +0200
Cosmetic corrections for the KERBEROS library
This commit applies some cosmetic corrections for the KERBEROS library.
commit 79854dc48a6f5448e4a435261ad2d9e9a2bbc712
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Thu Sep 18 15:34:58 2008 +0200
Kerberos cosmetic changes: Revert a part of the patch
Reverts a part of the patch because it changes the function of the code (suggested by Jelmer).
commit 57edd24ca0fd91ae4d967666dc381147654e27f7
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Tue Sep 9 17:37:33 2008 +0200
Cosmetic corrections for the KERBEROS library
This commit applies some cosmetic corrections for the KERBEROS library.
commit 9d849c30bc5dfb4c3b27639c52ba8c2a54d07471
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Tue Sep 9 17:36:52 2008 +0200
Cosmetic corrections for the LDB library
This commit applies some cosmetic corrections for the LDB library.
commit 9261fa997ccda8f89556b644ddd45cd86919ec2e
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Tue Sep 9 17:36:14 2008 +0200
Cosmetic corrections for the LDB backend modules
This commit applies some cosmetic corrections for the LDB backend modules.
commit cf1935817fce0d6c7f4d2797c18f8c116220abd4
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date: Tue Sep 9 17:06:13 2008 +0200
Cosmetic corrections for the DSDB module
This commit applies some cosmetic corrections for the DSDB (Directory Server Database).
-----------------------------------------------------------------------
Summary of changes:
source4/auth/gensec/cyrus_sasl.c | 2 +-
source4/auth/kerberos/kerberos.c | 4 +-
source4/auth/kerberos/kerberos_util.c | 18 ++++-----
source4/auth/kerberos/krb5_init_context.c | 4 +-
source4/dsdb/samdb/ldb_modules/kludge_acl.c | 4 +-
source4/dsdb/samdb/ldb_modules/proxy.c | 12 +++---
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 14 ++++----
source4/dsdb/samdb/ldb_modules/schema_fsmo.c | 2 +-
source4/kdc/hdb-ldb.c | 6 ++--
source4/lib/ldb-samba/ldif_handlers.c | 2 +-
source4/lib/ldb/common/attrib_handlers.c | 22 ++++++------
source4/lib/ldb/common/ldb_attributes.c | 8 ++--
source4/lib/ldb/common/ldb_debug.c | 2 +-
source4/lib/ldb/common/ldb_ldif.c | 18 +++++-----
source4/lib/ldb/common/ldb_modules.c | 6 ++--
source4/lib/ldb/ldb_ildap/ldb_ildap.c | 6 ++--
source4/lib/ldb/ldb_ldap/ldb_ldap.c | 18 +++++-----
source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 28 +++++++-------
source4/lib/ldb/ldb_tdb/ldb_cache.c | 22 ++++++------
source4/lib/ldb/ldb_tdb/ldb_pack.c | 12 +++---
source4/lib/ldb/ldb_tdb/ldb_search.c | 42 +++++++++++-----------
source4/lib/ldb/ldb_tdb/ldb_tdb.c | 20 +++++-----
source4/lib/ldb/ldb_tdb/ldb_tdb_wrap.c | 2 +-
source4/lib/ldb/modules/operational.c | 4 +-
source4/lib/ldb/modules/paged_results.c | 2 +-
source4/lib/ldb/modules/skel.c | 2 +-
source4/lib/ldb_wrap.c | 2 +-
27 files changed, 141 insertions(+), 143 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c
index 06a7b8a..6f82de8 100644
--- a/source4/auth/gensec/cyrus_sasl.c
+++ b/source4/auth/gensec/cyrus_sasl.c
@@ -110,7 +110,7 @@ static int gensec_sasl_get_password(sasl_conn_t *conn, void *context, int id,
static int gensec_sasl_dispose(struct gensec_sasl_state *gensec_sasl_state)
{
sasl_dispose(&gensec_sasl_state->conn);
- return 0;
+ return SASL_OK;
}
static NTSTATUS gensec_sasl_client_start(struct gensec_security *gensec_security)
diff --git a/source4/auth/kerberos/kerberos.c b/source4/auth/kerberos/kerberos.c
index 2579ab2..d54664f 100644
--- a/source4/auth/kerberos/kerberos.c
+++ b/source4/auth/kerberos/kerberos.c
@@ -33,7 +33,7 @@
This version is built to use a keyblock, rather than needing the
original password.
*/
- int kerberos_kinit_keyblock_cc(krb5_context ctx, krb5_ccache cc,
+ krb5_error_code kerberos_kinit_keyblock_cc(krb5_context ctx, krb5_ccache cc,
krb5_principal principal, krb5_keyblock *keyblock,
time_t *expire_time, time_t *kdc_time)
{
@@ -77,7 +77,7 @@
simulate a kinit, putting the tgt in the given credentials cache.
Orignally by remus at snapserver.com
*/
- int kerberos_kinit_password_cc(krb5_context ctx, krb5_ccache cc,
+ krb5_error_code kerberos_kinit_password_cc(krb5_context ctx, krb5_ccache cc,
krb5_principal principal, const char *password,
time_t *expire_time, time_t *kdc_time)
{
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 9002715..0567565 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -32,7 +32,7 @@ struct principal_container {
krb5_principal principal;
};
-static int free_principal(struct principal_container *pc)
+static krb5_error_code free_principal(struct principal_container *pc)
{
/* current heimdal - 0.6.3, which we need anyway, fixes segfaults here */
krb5_free_principal(pc->smb_krb5_context->krb5_context, pc->principal);
@@ -241,19 +241,17 @@ static krb5_error_code salt_principal_from_credentials(TALLOC_CTX *parent_ctx,
return 0;
}
-static int free_keytab(struct keytab_container *ktc)
+static krb5_error_code free_keytab(struct keytab_container *ktc)
{
- krb5_kt_close(ktc->smb_krb5_context->krb5_context, ktc->keytab);
-
- return 0;
+ return krb5_kt_close(ktc->smb_krb5_context->krb5_context, ktc->keytab);
}
-int smb_krb5_open_keytab(TALLOC_CTX *mem_ctx,
+krb5_error_code smb_krb5_open_keytab(TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
const char *keytab_name, struct keytab_container **ktc)
{
krb5_keytab keytab;
- int ret;
+ krb5_error_code ret;
ret = krb5_kt_resolve(smb_krb5_context->krb5_context, keytab_name, &keytab);
if (ret) {
DEBUG(1,("failed to open krb5 keytab: %s\n",
@@ -339,7 +337,7 @@ static krb5_error_code keytab_add_keys(TALLOC_CTX *parent_ctx,
return 0;
}
-static int create_keytab(TALLOC_CTX *parent_ctx,
+static krb5_error_code create_keytab(TALLOC_CTX *parent_ctx,
struct cli_credentials *machine_account,
struct smb_krb5_context *smb_krb5_context,
const char **enctype_strings,
@@ -603,7 +601,7 @@ static krb5_error_code remove_old_entries(TALLOC_CTX *parent_ctx,
return ret;
}
-int smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
+krb5_error_code smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
struct cli_credentials *machine_account,
struct smb_krb5_context *smb_krb5_context,
const char **enctype_strings,
@@ -635,7 +633,7 @@ int smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
return ret;
}
-int smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx,
+krb5_error_code smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx,
struct cli_credentials *machine_account,
struct smb_krb5_context *smb_krb5_context,
const char **enctype_strings,
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 82e42a4..90b542c 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -49,13 +49,13 @@ struct smb_krb5_socket {
krb5_krbhst_info *hi;
};
-static int smb_krb5_context_destroy_1(struct smb_krb5_context *ctx)
+static krb5_error_code smb_krb5_context_destroy_1(struct smb_krb5_context *ctx)
{
krb5_free_context(ctx->krb5_context);
return 0;
}
-static int smb_krb5_context_destroy_2(struct smb_krb5_context *ctx)
+static krb5_error_code smb_krb5_context_destroy_2(struct smb_krb5_context *ctx)
{
/* Otherwise krb5_free_context will try and close what we have already free()ed */
krb5_set_warn_dest(ctx->krb5_context, NULL);
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 6836f95..11e2b7a 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -142,7 +142,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
ldb_msg_add_string(msg, attrName, attr_list[i]);
}
talloc_free(mem_ctx);
- return 0;
+ return LDB_SUCCESS;
}
/* read all objectClasses */
@@ -201,7 +201,7 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message *
}
}
- return 0;
+ return LDB_SUCCESS;
}
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index d0a315e..7aa78e9 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -66,7 +66,7 @@ static int load_proxy_info(struct ldb_module *module)
/* see if we have already loaded it */
if (proxy->upstream != NULL) {
- return 0;
+ return LDB_SUCCESS;
}
dn = ldb_dn_new(proxy, module->ldb, "@PROXYINFO");
@@ -145,7 +145,7 @@ static int load_proxy_info(struct ldb_module *module)
talloc_free(res);
- return 0;
+ return LDB_SUCCESS;
failed:
talloc_free(res);
@@ -153,7 +153,7 @@ failed:
talloc_free(proxy->newdn);
talloc_free(proxy->upstream);
proxy->upstream = NULL;
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
@@ -259,7 +259,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
}
if (load_proxy_info(module) != 0) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
/* see if the dn is within olddn */
@@ -269,7 +269,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
newreq = talloc(module, struct ldb_request);
if (newreq == NULL) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
newreq->op.search.tree = proxy_convert_tree(module, req->op.search.tree);
@@ -298,7 +298,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
if (ret != LDB_SUCCESS) {
ldb_set_errstring(module->ldb, ldb_errstring(proxy->upstream));
talloc_free(newreq);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
for (i = 0; i < newreq->op.search.res->count; i++) {
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index dd5faf8..34e235a 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -124,16 +124,16 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
char *s;
if (ldb_msg_find_element(msg, attr) != NULL) {
- return 0;
+ return LDB_SUCCESS;
}
s = ldb_timestring(msg, t);
if (s == NULL) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
if (ldb_msg_add_string(msg, attr, s) != 0) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
el = ldb_msg_find_element(msg, attr);
@@ -141,7 +141,7 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
is ignored */
el->flags = LDB_FLAG_MOD_REPLACE;
- return 0;
+ return LDB_SUCCESS;
}
/*
@@ -152,11 +152,11 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
struct ldb_message_element *el;
if (ldb_msg_find_element(msg, attr) != NULL) {
- return 0;
+ return LDB_SUCCESS;
}
if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
el = ldb_msg_find_element(msg, attr);
@@ -164,7 +164,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
is ignored */
el->flags = LDB_FLAG_MOD_REPLACE;
- return 0;
+ return LDB_SUCCESS;
}
static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMetaData1 *m1,
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index 968b19c..7c6a6dd 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@ -307,7 +307,7 @@ static int generate_dITContentRules(struct ldb_context *ldb, struct ldb_message
}
}
}
- return 0;
+ return LDB_SUCCESS;
}
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index c5466f1..4fde75c 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -186,7 +186,7 @@ static HDBFlags uf2HDBFlags(krb5_context context, int userAccountControl, enum h
return flags;
}
-static int hdb_ldb_destrutor(struct hdb_ldb_private *private)
+static int hdb_ldb_destructor(struct hdb_ldb_private *private)
{
hdb_entry_ex *entry_ex = private->entry_ex;
free_hdb_entry(&entry_ex->entry);
@@ -542,7 +542,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
private->iconv_convenience = lp_iconv_convenience(lp_ctx);
private->netbios_name = lp_netbios_name(lp_ctx);
- talloc_set_destructor(private, hdb_ldb_destrutor);
+ talloc_set_destructor(private, hdb_ldb_destructor);
entry_ex->ctx = private;
entry_ex->free_entry = hdb_ldb_free_entry;
@@ -728,7 +728,7 @@ static krb5_error_code LDB_trust_message2entry(krb5_context context, HDB *db,
private->iconv_convenience = lp_iconv_convenience(lp_ctx);
private->netbios_name = lp_netbios_name(lp_ctx);
- talloc_set_destructor(private, hdb_ldb_destrutor);
+ talloc_set_destructor(private, hdb_ldb_destructor);
entry_ex->ctx = private;
entry_ex->free_entry = hdb_ldb_free_entry;
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index a16582d..46ea095 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -134,7 +134,7 @@ static int ldb_canonicalise_objectSid(struct ldb_context *ldb, void *mem_ctx,
/* Perhaps not a string after all */
return ldb_handler_copy(ldb, mem_ctx, in, out);
}
- return 0;
+ return LDB_SUCCESS;
}
return ldb_handler_copy(ldb, mem_ctx, in, out);
}
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c
index fb57e2d..6f1b081 100644
--- a/source4/lib/ldb/common/attrib_handlers.c
+++ b/source4/lib/ldb/common/attrib_handlers.c
@@ -38,9 +38,9 @@ int ldb_handler_copy(struct ldb_context *ldb, void *mem_ctx,
*out = ldb_val_dup(mem_ctx, in);
if (in->length > 0 && out->data == NULL) {
ldb_oom(ldb);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
- return 0;
+ return LDB_SUCCESS;
}
/*
@@ -57,13 +57,13 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx,
int l;
if (!in || !out || !(in->data)) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
out->data = (uint8_t *)ldb_casefold(ldb, mem_ctx, (const char *)(in->data), in->length);
if (out->data == NULL) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb_handler_fold: unable to casefold string [%s]", in->data);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
s = (char *)(out->data);
@@ -96,7 +96,7 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx,
}
out->length = strlen((char *)out->data);
- return 0;
+ return LDB_SUCCESS;
}
@@ -111,14 +111,14 @@ int ldb_canonicalise_Integer(struct ldb_context *ldb, void *mem_ctx,
char *end;
long long i = strtoll((char *)in->data, &end, 0);
if (*end != 0) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
out->data = (uint8_t *)talloc_asprintf(mem_ctx, "%lld", i);
if (out->data == NULL) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
out->length = strlen((char *)out->data);
- return 0;
+ return LDB_SUCCESS;
}
/*
@@ -251,7 +251,7 @@ int ldb_canonicalise_dn(struct ldb_context *ldb, void *mem_ctx,
}
out->length = strlen((char *)out->data);
- ret = 0;
+ ret = LDB_SUCCESS;
done:
talloc_free(dn);
@@ -305,10 +305,10 @@ int ldb_canonicalise_utctime(struct ldb_context *ldb, void *mem_ctx,
time_t t = ldb_string_to_time((char *)in->data);
out->data = (uint8_t *)ldb_timestring(mem_ctx, t);
if (out->data == NULL) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
out->length = strlen((char *)out->data);
- return 0;
+ return LDB_SUCCESS;
}
/*
diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c
index 747f241..0fbb5e2 100644
--- a/source4/lib/ldb/common/ldb_attributes.c
+++ b/source4/lib/ldb/common/ldb_attributes.c
@@ -61,7 +61,7 @@ int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb,
struct ldb_schema_attribute, n);
if (a == NULL) {
ldb_oom(ldb);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
ldb->schema.attributes = a;
@@ -70,7 +70,7 @@ int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb,
if (cmp == 0) {
/* silently ignore attempts to overwrite fixed attributes */
if (a[i].flags & LDB_ATTR_FLAG_FIXED) {
- return 0;
+ return LDB_SUCCESS;
}
if (a[i].flags & LDB_ATTR_FLAG_ALLOCATED) {
talloc_free(discard_const_p(char, a[i].name));
@@ -93,11 +93,11 @@ int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb,
a[i].name = talloc_strdup(a, a[i].name);
if (a[i].name == NULL) {
ldb_oom(ldb);
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
}
- return 0;
+ return LDB_SUCCESS;
}
static const struct ldb_schema_syntax ldb_syntax_default = {
diff --git a/source4/lib/ldb/common/ldb_debug.c b/source4/lib/ldb/common/ldb_debug.c
index 0f78e37..8e1c491 100644
--- a/source4/lib/ldb/common/ldb_debug.c
+++ b/source4/lib/ldb/common/ldb_debug.c
@@ -43,7 +43,7 @@ int ldb_set_debug(struct ldb_context *ldb,
{
ldb->debug_ops.debug = debug;
ldb->debug_ops.context = context;
- return 0;
+ return LDB_SUCCESS;
}
/*
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index fb93e17..6cbd30f 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -191,19 +191,19 @@ int ldb_should_b64_encode(const struct ldb_val *val)
uint8_t *p = val->data;
if (val->length == 0) {
- return 0;
+ return LDB_SUCCESS;
}
if (p[0] == ' ' || p[0] == ':') {
- return 1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
for (i=0; i<val->length; i++) {
if (!isprint(p[i]) || p[i] == '\n') {
- return 1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
}
- return 0;
+ return LDB_SUCCESS;
}
/* this macro is used to handle the return checking on fprintf_fn() */
@@ -444,12 +444,12 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val
value->length = 0;
*attr = "-";
*s += 2;
- return 0;
+ return LDB_SUCCESS;
}
p = strchr(*s, ':');
if (!p) {
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
*p++ = 0;
@@ -487,7 +487,7 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val
int len = ldb_base64_decode((char *)value->data);
if (len == -1) {
/* it wasn't valid base64 data */
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
}
value->length = len;
}
@@ -496,11 +496,11 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val
int len = ldb_read_data_file(mem_ctx, value);
if (len == -1) {
/* an error occured hile trying to retrieve the file */
- return -1;
+ return LDB_ERR_OPERATIONS_ERROR;
--
Samba Shared Repository
More information about the samba-cvs
mailing list