diff options
author | Simo Sorce <idra@samba.org> | 2006-02-04 00:38:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:44 -0500 |
commit | f5ebc8e404f4397c0ef2c8b838984df1767c955c (patch) | |
tree | d2a1594cb7180375d4c11986cc308c42f391ad4d /source4/lib/ldb/common/ldb_ldif.c | |
parent | c838f4965b8b7b2b134fd4855301227f19e4c95d (diff) | |
download | samba-f5ebc8e404f4397c0ef2c8b838984df1767c955c.tar.gz samba-f5ebc8e404f4397c0ef2c8b838984df1767c955c.tar.bz2 samba-f5ebc8e404f4397c0ef2c8b838984df1767c955c.zip |
r13324: From now on check attribute names obey rfc2251
Also add a way to provide utf8 compliant functions
by registering them with ldb_set_utf8_fns()
Next comes code to register samba internal utf8 functions.
Simo.
(This used to be commit ac9b8a41ffca8e06c5e849d544d3203a665b8e0d)
Diffstat (limited to 'source4/lib/ldb/common/ldb_ldif.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_ldif.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c index 53dadcc6fe..7501e89222 100644 --- a/source4/lib/ldb/common/ldb_ldif.c +++ b/source4/lib/ldb/common/ldb_ldif.c @@ -499,40 +499,6 @@ void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *ldif) } /* - add an empty element -*/ -static int msg_add_empty(struct ldb_context *ldb, - struct ldb_message *msg, const char *name, unsigned flags) -{ - struct ldb_message_element *el2, *el; - - el2 = talloc_realloc(msg, msg->elements, - struct ldb_message_element, msg->num_elements+1); - if (!el2) { - errno = ENOMEM; - return -1; - } - - msg->elements = el2; - - el = &msg->elements[msg->num_elements]; - - el->name = talloc_strdup(msg->elements, name); - el->num_values = 0; - el->values = NULL; - el->flags = flags; - - if (!el->name) { - errno = ENOMEM; - return -1; - } - - msg->num_elements++; - - return 0; -} - -/* read from a LDIF source, creating a ldb_message */ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb, @@ -630,7 +596,7 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb, } if (empty) { - if (msg_add_empty(ldb, msg, (char *)value.data, flags) != 0) { + if (ldb_msg_add_empty(msg, (char *)value.data, flags) != 0) { goto failed; } continue; |