1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

21 Commits

Author SHA1 Message Date
Günther Deschner
9e5256ad15 werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source4/dsdb/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:19 +02:00
Stefan Metzmacher
0a1627de6d s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
It's perfectly valid to replicate from a partner with an older schema
version, otherwise schema changes would block any other replication
until every dc in the forest has the schema changes.

The avoids an endless loop trying to get schema in sync with the partner.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Stefan Metzmacher
386dbc428b s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
This will simplify the schema checking in future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-08-11 00:49:14 +02:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Tridgell
47591ea5ec s4-dsdb: moved a bunch of fuctions from schema/schema_info_attr.c to samdb/ldb_modules/schema_util.c
these functions operate on ldb_modules, so they should be in the
ldb_modules directory. They also should return ldb errors codes, not
WERROR codes, as otherwise the error can be hidden from the ldap
caller

This re-arrangement fixes a dependency loop in the schema/samdb code.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Kamen Mazdrashki <kamenim@samba.org>
2010-10-21 19:03:25 +11:00
Kamen Mazdrashki
9256b5f226 s4-schema: Helper func to compare schemaInfo signitures 2010-09-17 13:53:03 +03:00
Kamen Mazdrashki
e691b1fd27 s4-dsdb: Add dsdb_schema_info_blob_is_valid() to verify schemaInfo blobls 2010-09-17 13:53:03 +03:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Kamen Mazdrashki
59830d0a6e s4/dsdb: schemaInfo revision may be 0
In case schemaInfo value is still not set, WinAD supplies
schemaInfo blob with revision = 0 and GUID_ZERO
2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
a8438015ca s4/dsdb: remove unused dsdb_schema_info_create() function 2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
2264d917ae s4/dsdb: Update Schema cache with updated schemaInfo value
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.
2010-04-29 04:54:07 +03:00
Kamen Mazdrashki
e41eac96af s4/samldb: Create initial schemaInfo value if it doesn't exists yet 2010-04-29 04:54:06 +03:00
Kamen Mazdrashki
546a727bd3 s4/dsdb: Use default schemaInfo value when no such value is given
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.
2010-04-29 04:54:06 +03:00
Kamen Mazdrashki
5bf12e101a Revert "s4/dsdb: Set schemaInfo attribute value during provisioning"
This reverts commit 8149094edd.

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.
2010-04-29 04:54:05 +03:00
Andrew Tridgell
2dcc84432e s4-schema: allow revision numbers of zero
w2k8r2 sends a revision of zero in the initial schema replication
during a net vampire

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-21 13:35:56 +10:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Andrew Bartlett
77267733ed s4:dsdb Don't use the permissive modify control on schemaInfo updates
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
2010-04-10 21:41:57 +10:00
Kamen Mazdrashki
8149094edd s4/dsdb: Set schemaInfo attribute value during provisioning
After provisioning new Forest, schemaInfo should be set
to a value with revision=1 and current invocation_id
2010-04-09 12:21:34 +03:00
Kamen Mazdrashki
4ba2ac073d s4/dsdb: split writing of schemaInfo blob in two parts
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
2010-04-09 12:21:33 +03:00
Kamen Mazdrashki
fbef33fb73 s4/dsdb: Let caller to control if valid invocationId is critical or zero-guid is acceptable 2010-04-09 12:21:33 +03:00
Kamen Mazdrashki
9d1f8bcca9 s4/dsdb: dsdb_schema_info object implementation 2010-04-09 12:21:26 +03:00