added a LDB_ATTR_FLAG_FIXED so the schema module can mark attributes
[tprouty/samba.git] / source4 / lib / ldb / common / ldb_attributes.c
index effd93ae2674e9e8ec620d53033b3bf4e2732886..81aab52a0898f3b5b567018bd8658ef9d4517fbb 100644 (file)
@@ -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));
        }