diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-11-09 22:19:52 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-09 22:19:52 +1100 |
commit | 932cda330af01d8f749c68cf2cbe59c79c6c3ea8 (patch) | |
tree | c9953d612e3b80bf16e88c9c9017473f004e42b7 /source4/dsdb/samdb/ldb_modules | |
parent | 2b858c69391b2d64f19291eb349cb5ba9e48045b (diff) | |
download | samba-932cda330af01d8f749c68cf2cbe59c79c6c3ea8.tar.gz samba-932cda330af01d8f749c68cf2cbe59c79c6c3ea8.tar.bz2 samba-932cda330af01d8f749c68cf2cbe59c79c6c3ea8.zip |
s4-samdb: remove the rDN size constraint of 64
This size constraint is not correct in it's current form, as windows
does send us rDN values for CN with lengths longer than 64. Once we
know how this constraint really works we can add it back in.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index 003d6731d4..ba28d42e7f 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -347,12 +347,19 @@ static int fix_dn(TALLOC_CTX *mem_ctx, return LDB_ERR_OPERATIONS_ERROR; } - /* AD doesn't allow the rDN to be longer than 64 characters */ + rdn_val = ldb_dn_get_rdn_val(newdn); + +#if 0 + /* the rules for rDN length constraints are more complex than + this. Until we understand them we need to leave this + constraint out. Otherwise we break replication, as windows + does sometimes send us rDNs longer than 64 */ if (!rdn_val || rdn_val->length > 64) { - DEBUG(2,(__location__ ": rDN longer than 64 limit for '%s'\n", ldb_dn_get_linearized(newdn))); - return LDB_ERR_CONSTRAINT_VIOLATION; + DEBUG(2,(__location__ ": WARNING: rDN longer than 64 limit for '%s'\n", ldb_dn_get_linearized(newdn))); } +#endif + /* And replace it with CN=foo (we need the attribute in upper case */ return ldb_dn_set_component(*fixed_dn, 0, upper_rdn_attr, *rdn_val); |