The branch, v4-0-test has been updated
       via  e860fc171fd127d73df23336089c1479911953da (commit)
      from  3bdc906eb63a494f0d8478c13f8330828aa2f725 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit e860fc171fd127d73df23336089c1479911953da
Author: Andrew Tridgell <[EMAIL PROTECTED]>
Date:   Wed Aug 20 16:00:54 2008 +1000

    don't overwrite fixed attributes with @ATTRIBUTES

-----------------------------------------------------------------------

Summary of changes:
 source/lib/ldb/common/ldb_attributes.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/ldb/common/ldb_attributes.c 
b/source/lib/ldb/common/ldb_attributes.c
index 1e69f41..3b9d016 100644
--- a/source/lib/ldb/common/ldb_attributes.c
+++ b/source/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));
                        }


-- 
Samba Shared Repository

Reply via email to