Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
This structure is intended to hold context-dependent data.
Syntax-conversion and object-conversion functions need
that data to convert objects and attributes from drs-to-ldb
and ldb-to-drs correctly.
For instance: ATTID value depends on whether we are converting
object from partition different that Schema partition.
|
|
|
|
Error message show failing classSchema object
but not the specific value for the failure,
which makes diagnostics by log files really hard.
|
|
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Few comments split on several lines also...
(Sorry Metze, I know you hate reviewing "and this, and that"
type of patches, but those are just cosmetics)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)"
in places in the dsdb code where we don't already explicitly set an
error string. This should make is much easier to track down dsdb
module bugs that result in an operations error.
|
|
|
|
We already choose the right entry by specifying the right basedn with scope
"LDB_SCOPE_BASE".
|
|
|
|
This is needed so we can find and free old schemas based using
the cached pointer
|
|
It was reported by aatanasov that we kept around one whole schema per
modification made. This does not fix that, but I hope moves us closer
to a fix
The most important part of the fix is that:
- if (schema_out != schema_in) {
- talloc_unlink(schema_in, ldb);
- }
was the wrong way around. This is now handled in the schema_set calls.
Andrew Bartlett
|
|
Especially the "free"s after "ldb_msg_diff" are very important since the diff
message is allocated on the long-living LDB context.
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
|
|
The problem here is that if the schema has been modified on the source
domain, there may be attributes that appear over DRS with 0 values (to
indicate that any existing values on the target should be deleted).
This would confuse the previous version of this macro.
Andrew Bartlett
|
|
|
|
This way dsdb_setup_sorted_accessors() will
free memory allocated for accessor arrays correctly
in case of failure,
|
|
O(n) search for dsdb_attribute by msDS-IntId value was
replaced by binary-search in ordered index.
I've choosen the approach of separate index on msDS-IntId values
as I think it is more clear what we are searching for.
And it should little bit faster as we can clearly determine
in which index to perform the search based on ATTID value -
ATTIDs based on prefixMap and ATTIDs based on msDS-IntId
are in separate ranges.
Other way to implement this index was to merge msDS-IntId values
in attributeID_id index.
This led me to a shorted but not so obvious implementation.
|
|
provision
This allows the prefixMap from a DRS server to be used when loading
the schema from the local files. This helps us then import other
schema with this map in place.
Andrew Bartlett
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
|
|
The change here is to try and convert a per the previous rules, but if
we don't know a particular OID as a attributeID, then store it as an
OID (for example). This allows known values to be converted as
before, but still copes with unknown values.
Andrew Bartlett
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
|
|
This works on the assumption that the schema partition can only
contain schema objects.
We may need to pass down some kind of 'relax' to the DRS -> LDB
conversion code, so that it allows incomplete conversions, so that we
don't fail if a new attribute is present, and we can't decode it.
This would then be resolved the second time we do the conversion.
Andrew Bartlett
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
|
|
There is no need to do a full ldb_match_msg() for a simple case
insensitive string.
Andrew Bartlett
|
|
This allows us to push a prefixmap directly into the schema we
generate in the provision code.
Andrew Bartlett
|
|
|
|
I'm not sure why I removed these in fe3e1af901c970f738bee92baac5d7d4f5736e17
Andrew Bartlett
|
|
far more complete "objectclass_attrs" LDB module
|
|
|
|
|
|
|
|
|
|
In case schemaInfo value is still not set, WinAD supplies
schemaInfo blob with revision = 0 and GUID_ZERO
|
|
|
|
Error checking is simplified and my leave leeks.
I did it this way to make code more readable, and if we
get error in those lines, it will be WERR_NOMEM in which
case we are in a much deeper troubles than delayed freeing
of few bytes.
|
|
|
|
Having no value for schemaInfo is totally OK as it turns out.
In such cases, we should use a default value with
all fields set to 0.
|
|
This reverts commit 8149094eddebd9a0e8b7c123c2ed54d00164bb26.
Windows implementation does not set schemaInfo attribute value
until first Schema update request.
This way, newly provisioned forest returns no schemaInfo value.
I think it won't be bad for us to have this value preset, but
I want to mimic Win AD behavior as close as possible.
|
|
This will be used by the RODC code
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
w2k8r2 sends a revision of zero in the initial schema replication
during a net vampire
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
|
|
The use of 'replace' is enough to wipe out the old value, whatever it
is, we don't need to set 'permissive modify' too.
Additionally, this seems to be causing trouble for the OpenLDAP backend
Andrew Bartlett
|
|
After provisioning new Forest, schemaInfo should be set
to a value with revision=1 and current invocation_id
|
|
ldb_msg preparation is moved into separate function
so that it can be used for implementing schemaInfo
updates both on module stack (dsdb_module_... functions)
and directly on ldb_context
|
|
zero-guid is acceptable
|
|
|
|
|