git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f96f623
)
don't overwrite fixed attributes with @ATTRIBUTES
author
Andrew Tridgell
<tridge@samba.org>
Wed, 20 Aug 2008 06:00:54 +0000
(16:00 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 20 Aug 2008 06:00:54 +0000
(16:00 +1000)
(This used to be commit
e860fc171fd127d73df23336089c1479911953da
)
source4/lib/ldb/common/ldb_attributes.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/common/ldb_attributes.c
b/source4/lib/ldb/common/ldb_attributes.c
index 1e69f412df97203326893864b5cbf70afd37ebf3..3b9d01682ccc402513a1e5abb1ff97dedd81c77f 100644
(file)
--- a/
source4/lib/ldb/common/ldb_attributes.c
+++ b/
source4/lib/ldb/common/ldb_attributes.c
@@
-64,6
+64,10
@@
int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb,
for (i = 0; i < ldb->schema.num_attributes; i++) {
int cmp = ldb_attr_cmp(attribute, a[i].name);
if (cmp == 0) {
+ /* silently ignore attempts to overwrite fixed attributes */
+ if (a[i].flags & LDB_ATTR_FLAG_FIXED) {
+ return 0;
+ }
if (a[i].flags & LDB_ATTR_FLAG_ALLOCATED) {
talloc_free(discard_const_p(char, a[i].name));
}