summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-08-20 15:52:08 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-08-20 15:52:08 +1000
commit4bfab3bedbf36979424e3d284e8bd67c8224d47b (patch)
tree35531e74f8349559ab534a50f0938aa6479379f1
parent6e5f2454acb6ad11e799faed834fb4937651737d (diff)
parentf96f623854d3cd8bdaacd25979618f1cb53b8f93 (diff)
downloadsamba-4bfab3bedbf36979424e3d284e8bd67c8224d47b.tar.gz
samba-4bfab3bedbf36979424e3d284e8bd67c8224d47b.tar.bz2
samba-4bfab3bedbf36979424e3d284e8bd67c8224d47b.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 9fa48b3572cb4e55cfaa48a8b516a91904048573)
-rw-r--r--source4/lib/charset/iconv.c7
-rw-r--r--source4/lib/ldb/common/ldb_attributes.c5
-rw-r--r--source4/lib/ldb/include/ldb.h4
3 files changed, 14 insertions, 2 deletions
diff --git a/source4/lib/charset/iconv.c b/source4/lib/charset/iconv.c
index 4f4bc8fd2d..d4f930b462 100644
--- a/source4/lib/charset/iconv.c
+++ b/source4/lib/charset/iconv.c
@@ -469,6 +469,9 @@ static size_t iconv_copy(void *cd, const char **inbuf, size_t *inbytesleft,
return 0;
}
+/*
+ this takes a UTF8 sequence and produces a UTF16 sequence
+ */
static size_t utf8_pull(void *cd, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
@@ -586,6 +589,10 @@ error:
return -1;
}
+
+/*
+ this takes a UTF16 sequence and produces a UTF8 sequence
+ */
static size_t utf8_push(void *cd, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c
index ab6aa0b734..1e69f412df 100644
--- a/source4/lib/ldb/common/ldb_attributes.c
+++ b/source4/lib/ldb/common/ldb_attributes.c
@@ -157,6 +157,11 @@ void ldb_schema_attribute_remove(struct ldb_context *ldb, const char *name)
return;
}
+ /* FIXED attributes are never removed */
+ if (a->flags & LDB_ATTR_FLAG_FIXED) {
+ return;
+ }
+
if (a->flags & LDB_ATTR_FLAG_ALLOCATED) {
talloc_free(discard_const_p(char, a->name));
}
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 0338ae1d93..7ce6103422 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -358,9 +358,9 @@ const struct ldb_schema_attribute *ldb_schema_attribute_by_name(struct ldb_conte
#define LDB_ATTR_FLAG_ALLOCATED (1<<1)
/**
- The attribute is constructed from other attributes
+ The attribute is supplied by the application and should not be removed
*/
-#define LDB_ATTR_FLAG_CONSTRUCTED (1<<1)
+#define LDB_ATTR_FLAG_FIXED (1<<2)
/**
LDAP attribute syntax for a DN