summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-20 15:46:58 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-20 15:46:58 +1000
commit7e1c62f8b64c9e42018bea33557af31fb7fa7414 (patch)
treeb6f34fb1b15227f5194acb8bb5c16aff78c7a5c1 /source4/lib/ldb/common
parente1188406fb1e42ac04abc46f8a09522a29b83178 (diff)
downloadsamba-7e1c62f8b64c9e42018bea33557af31fb7fa7414.tar.gz
samba-7e1c62f8b64c9e42018bea33557af31fb7fa7414.tar.bz2
samba-7e1c62f8b64c9e42018bea33557af31fb7fa7414.zip
added a LDB_ATTR_FLAG_FIXED so the schema module can mark attributes
as never to be removed. (This used to be commit 9dce558206a2ce70c69b9b6c5c3c9c58ee165b1d)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_attributes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c
index effd93ae26..81aab52a08 100644
--- a/source4/lib/ldb/common/ldb_attributes.c
+++ b/source4/lib/ldb/common/ldb_attributes.c
@@ -149,6 +149,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));
}