fixed the GUID and objectSID canonicalisation functions
authorAndrew Tridgell <tridge@samba.org>
Fri, 22 Aug 2008 08:37:34 +0000 (18:37 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 22 Aug 2008 08:37:34 +0000 (18:37 +1000)
(This used to be commit 115053ea7e70b067e7873668ed83f1f10908287d)

source4/lib/ldb-samba/ldif_handlers.c

index 04fcd66b6eb79dd7b2b67830b8224ddf3b65da46..a16582d29458a1e0b23cfa7e822c0e1e8fecf4a1 100644 (file)
@@ -134,6 +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_handler_copy(ldb, mem_ctx, in, out);
 }
@@ -148,7 +149,7 @@ static int ldif_read_objectGUID(struct ldb_context *ldb, void *mem_ctx,
        char *guid_string;
        NTSTATUS status;
        enum ndr_err_code ndr_err;
-       guid_string = talloc_strndup(mem_ctx, in->data, in->length);
+       guid_string = talloc_strndup(mem_ctx, (const char *)in->data, in->length);
        if (!guid_string) {
                return -1;
        }
@@ -251,6 +252,7 @@ static int ldb_canonicalise_objectGUID(struct ldb_context *ldb, void *mem_ctx,
                        /* Perhaps it wasn't a valid string after all */
                        return ldb_handler_copy(ldb, mem_ctx, in, out);
                }
+               return 0;
        }
        return ldb_handler_copy(ldb, mem_ctx, in, out);
 }