Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
authorAndrew Bartlett <abartlet@samba.org>
Wed, 20 Aug 2008 05:52:08 +0000 (15:52 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Aug 2008 05:52:08 +0000 (15:52 +1000)
(This used to be commit 9fa48b3572cb4e55cfaa48a8b516a91904048573)

source4/lib/charset/iconv.c
source4/lib/ldb/common/ldb_attributes.c
source4/lib/ldb/include/ldb.h

index 4f4bc8fd2da70c9f9d5bb75b2ee0f946516c996a..d4f930b4622dc8893d4f58acd6a743374d5caf9d 100644 (file)
@@ -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)
 {
index ab6aa0b7341a9871a3072e690095662753c75743..1e69f412df97203326893864b5cbf70afd37ebf3 100644 (file)
@@ -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));
        }
index 0338ae1d938654305ba1624a5cba97cd9a347437..7ce61034228da9dd9d176cd8f7e3908106968699 100644 (file)
@@ -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