summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c9
-rw-r--r--source4/lib/ldb/include/ldb.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 79ec857cbd..463bae483b 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -728,11 +728,14 @@ static int fgetc_string(void *private_data)
return EOF;
}
-struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char *s)
+struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char **s)
{
struct ldif_read_string_state state;
- state.s = s;
- return ldb_ldif_read(ldb, fgetc_string, &state);
+ struct ldb_ldif *ldif;
+ state.s = *s;
+ ldif = ldb_ldif_read(ldb, fgetc_string, &state);
+ *s = state.s;
+ return ldif;
}
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 1f642d3bff..b2468b6ecb 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -316,7 +316,7 @@ void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *);
struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
int (*fgetc_fn)(void *), void *private_data);
struct ldb_ldif *ldb_ldif_read_file(struct ldb_context *ldb, FILE *f);
-struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char *s);
+struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char **s);
int ldb_ldif_write_file(struct ldb_context *ldb, FILE *f, const struct ldb_ldif *msg);
char *ldb_base64_encode(void *mem_ctx, const char *buf, int len);
int ldb_base64_decode(char *s);