Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
(it didn't help that the previous allocation was on the wrong long-term context)
Andrew Bartlett
|
|
By splitting the module this way, we can load the schema at startup, after
the partitions module is operational, but we leave the 'mess with details of
entries in the partitions' module to operate only on the partitions module.
Loading the schema later allows us to set the @ATTRIBUTES correctly on all
the databases.
Andrew Bartlett
|
|
|
|
|
|
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.
The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
|
|
Similarly to system_session(), this creates a static
samdb_credentials()
|
|
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
This makes the namingContext attributes in the rootDSE a little more pretty, by
using the exact same values as used in the database DNs.
Andrew Bartlett
|
|
This is needed because the work to allow existing databases to be loaded now
moves the 'you have an old @PARTITION' record to the presense or absence of
this attribute.
Andrew Bartlett
|
|
On OpenSolaris MAP_RENAME and friends are defined in <sys/mman.h> e.g. mmap and friends. So on these systems MAP_* have a meaning. Cleaned up LDB name space by adding LDB_ in front of MAP_* e.g. MAP_RENAME => LDB_MAP_RENAME
Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
This should make upgrades easier
|
|
The previous code would fail if the caller used tdb:// in the URL for the
top-level database.
Andrew Bartlett
|
|
|
|
This ensures that the partition control, needed here for repl_meta_data's
internal work, is not pushed up to other callers.
Andrew Bartlett
|
|
This is a collection of fixes to allow the creation of new partitions,
as well as adding debugging that may be useful in chasing down future
failures.
Andrew Bartlett
|
|
This is no longer required, as the instancetype module is now above
repl_meta_data.
Andrew Bartlett
|
|
The problem here has been avoided in repl_meta_data, and so this is no
longer required.
Andrew Bartlett
|
|
This major rework of repl_meta_data changes it from using a static
list of partitions to a dynamic list created from the controls placed
on returned ldb results.
To process these in one place, the similar but distinct callbacks are
combined into a single replmd_op_callback(), which handles both the
'normal operation' and 'inbound replication' case.
This allows new partitions to be created, and replication events for
these new partitions to be scheduled immediately.
Also in this commit: We no longer specify the target partition for new
or modified objects - instead we allow the partitions module to use
the DN as normal. THis avoids the issue where we would create two
partition head records.
Andrew Bartlett
|
|
|
|
This means we don't return any control for modifications to the
control records in sam.ldb, but do if they modified one of the actual
data LDB files.
Andrew Bartlett
|
|
This allows one instance of LDB to add a partition, and another to use
it without first closing the database.
Andrew Bartlett
|
|
I see no reason to reload it when in a transaction - it can't change
on us anyway (we possibly need to watch for our own changes to
@PARTITION however)
Andrew Bartlett
|
|
This uses the fact that the primary DB does not change often. Before
each operation, we see if the sequence number has changed.
Andrew Bartlett
|
|
This helps us ensure we always set the metadata, even when we are
'adding' a partition that is already in our list. (We *really* don't
want these getting out of sync, and the extra writes are harmless)
Andrew Bartlett
|
|
The issue here is that before we load the schema partition, we may not
have the correct casefolding rules. As such, keep things simple and
use the DN exactly as found in the @PARTITIONS record to find the
database.
Andrew Bartlett
|
|
|
|
This is needed because the new format of the partitions record is a
casefolded DN, not a DN and file combination.
Andrew Bartlett
|
|
I really don't want a cn=foo/../bar in my ldb file name.
Andrew Bartlett
|
|
This allows the partition to be created before we try and set a
notification on it. (perhaps extra work required here for partition
heads).
Andrew Bartlett
|
|
This is done by passing an extended operation to the partitions module
to extend the @PARTITION record and to extend the in-memory list of
partitions.
This also splits things up into module parts that belong above and below
repl_meta_data
Also slit the partitions module into two files due to the complexity
of the code
Andrew Barltett
|
|
Currenly implemented functions are:
dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid()
and dsdb_schema_pfm_oid_from_attid()
|
|
Currenly those tests cover only the main part of the interface,
i.e. dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid()
and dsdb_schema_pfm_oid_from_attid()
|
|
Nadya, I'm guessing you plan on adding some real elements to this
structure later. For now I've added _dummy so the build can continue
with the Solaris C compiler.
|
|
According to abartlet's response on my post about "lp_workgroup" this should be
the right call.
|
|
|
|
We were storing privileges in the sam, which was OK when we were a
standalone DC, but is no good when we replicate with a windows DC.
This moves the privileges to a separate (local) database
|
|
|
|
The biggest change is that 'oid' field is transmited in binary format.
Also the field name is changed to 'binary_oid' so that
field format to be clear for callers.
After those changes, Samba4 should work the way it works before -
i.e. no added value here but we should not fail when
partial-oid is part of prefixMap transmited from Win server.
Also, thre is a bug in this patch - partial-binary-OIDs are
not handled correctly. Partial-binary-OIDs received during
replication will be encoded, but not handled correctly.
|
|
w2k8 imposes a limit of 64 characters on the rDN
|
|
Later we will need to make samdb_rodc() look in the database, but for
now we should at least have the function in a central place
|
|
And don't cut them out from the DNS hostname.
|
|
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
|
|
I think the check for empty messages fits best here.
|
|
|
|
|
|
This avoids using an ldb_search(), which would run from the top of the
module stack. This will help us load the schema before the partitions
are initialised.
Andrew Bartlett
|
|
These take an ldb_module argument, and avoid doing the search from the
top of the stack again.
(This will help when modules are initialised before being added to the
partition set)
Andrew Bartlett
|
|
This was a bad idea all along, as Simo said at the time. With the
full MS schema and enforcement of it, it is an even worse idea.
This fixes the provision of the member server in 'make test'
Andrew Bartlett
|