1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

42 Commits

Author SHA1 Message Date
Kamen Mazdrashki
ca80918613 s4-dsdb: Use dsdb_syntax_ctx in *_validate_ldb functions 2010-08-19 03:34:01 +03:00
Kamen Mazdrashki
b7d1586ccd s4-dsdb: Add context structure for dsdb_syntax conversion functions
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.
2010-08-19 03:34:01 +03:00
Kamen Mazdrashki
267645ca55 s4/dsdb-schema: Index attributes on msDS-IntId value
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.
2010-06-21 02:57:55 +03:00
Andrew Bartlett
5323485eb3 s4:dsdb Allow the setting an override on the schema
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>
2010-06-15 10:51:34 +10:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Kamen Mazdrashki
37a6b66344 s4/dsdb: Define dsdb representation for schemaInfo attribute 2010-04-09 12:21:25 +03:00
Andrew Bartlett
f8019ff793 s4:dsdb Add a shortcut sequence number for schema reloads
This uses the ldb sequence number, in a hope to detect an unchanged
schema quicker.

Andrew Bartlett
2010-03-22 20:24:41 +11:00
Andrew Bartlett
639728a298 s4:schema Expand the schema structure
We now store the location of the schema in the schema, and provide
hooks for a future schema reloading mechanism.

Andrew Bartlett
2010-03-22 20:24:41 +11:00
Stefan Metzmacher
b20707c11a s4:dsdb/schema: add inftrastructure for dsdb_validate_ldb()
metze
2010-01-13 16:03:54 +01:00
Kamen Mazdrashki
a44ae10c77 s4/dsdb_schema: fetch msDS-IntId value during SCHEMA replication 2010-01-08 13:03:03 +11:00
Matthias Dieter Wallnöfer
7be99d3735 s4:schema - Make some more (result) variables const and fix up warnings with "discard_const_p" 2009-12-01 16:48:02 +11:00
Andrew Bartlett
39b8f31d66 s4:dsdb Load objectGUID and extended DN defaultObjectCategory into the schema
The load of defaultObjectCategory as an extended DN means we need to
use the common parsing functions I just split out, rather than the
GET_DS_DN macro.

The objectGUIDs are loaded so that we can create the extended DN when
we load from LDIF (and are loaded for the other cases for
consistency).

Also adapt callers to API changes needed for common parsing code

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Kamen Mazdrashki
c236bb537f s4/drs: Remove unused structures and functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:50 +01:00
Kamen Mazdrashki
db82023af2 s4/drs: remove unused num_prefixes and prefixes from dsdb_schema
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:49 +01:00
Kamen Mazdrashki
3729272f0a s4/drs: dsdb_schema uses dsdb_schema_prefixmap definition
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:41 +01:00
Kamen Mazdrashki
4dc90c0851 s4/drs(tort): Unit test for prefixMap implementation.
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()
2009-10-21 11:49:50 +03:00
Andrew Bartlett
0e028fcb7d s4:dsdb add systemPossibleInferiors to schema code
This allows us to figure out what the system can add, which will not
be in possibleInferiors due to the systemOnly flag.

Andrew Bartlett
2009-10-03 12:37:55 +02:00
Andrew Bartlett
9a209ac252 s4:schema Add code to provide an index into the subClass tree
In time, this should avoid the astounding (order) complexity of the
objectclass sorting in objectclass.c eventually.

Andrew Bartlett
2009-09-15 10:38:52 -07:00
Andrew Tridgell
ae8515d31b fixed the pull of drs schema elements
The previous code incorrectly assumed that attributes such as 
subClassOf come over the wire as strings. In fact they come over as 32
bit integers which refer to goversIDs. We have to post-process these
as it sometimes happens that a governsID comes over the wire before
the record that defines what it means.
2009-07-02 14:55:38 +10:00
Andrew Tridgell
37254b7a76 fixed the possibleInferiors calculation so it now passes the test
We are probably still using more memory here than we need to. That
needs to be looked at.
2009-04-09 13:46:18 +10:00
Andrew Bartlett
db29383797 Make the schema_inferiors generation code to compile
Sadly it still segfaults at this stage

Andrew Bartlett
2009-04-08 23:18:49 +10:00
Andrew Tridgell
9539e2b508 major upgrade to the ldb attribute handling
This is all working towards supporting the full WSPP schema without a
major performance penalty.

We now use binary searches when looking up classes and attributes. We
also avoid the loop loading the attributes into ldb, by adding a hook
to override the ldb attribute search function in a module. The
attributes can thus be loaded once, and then saved as part of the
global schema. 

Also added support for a few more key attribute syntaxes, as needed
for the full schema.
2009-04-02 16:42:21 +11:00
Andrew Bartlett
6488afaafe Now store the GUID and SID from a DN over DRSUAPI into ldb.
Until the extended DN work was compleated, there was no way to store
the additional metadata.

Andrew Bartlett
2008-12-20 14:44:39 +11:00
Stefan Metzmacher
203544e690 s4:dsdb/schema: use pointers for rangeLower and rangeUpper.
This makes clear there's an value stored in the schema,
as they can be '0'.

metze
2008-11-16 16:37:27 +01:00
Andrew Bartlett
bb80a19714 Note the ldb syntax for attribute syntaxes in the table.
This includes additional Samba-specific syntaxes made available from
the ldif_handlers code.

This commit also changes some table to use #defines, to ensure
consistancy in other parts of the code.

Andrew Bartlett
(This used to be commit e26a5efd9a)
2008-08-18 20:30:27 +10:00
Andrew Bartlett
46c94dd8b2 Merge the two attribute syntax tables.
This merges the table once found in the oLschema2ldif tool (and moved
many times) with the table used for DRSUAPI.

The OpenLDAP schema map has been updated, to ensure that despite a
number of attributes being declared as OIDs, they are actually used as
strings (as they are actually LDAP class/attribute names).

Andrew Bartlett
(This used to be commit 61f2958c84)
2008-08-18 10:16:45 +10:00
Andrew Bartlett
16112762e7 Generate the subSchema in cn=Aggregate
This reads the schema from the in-memory structure, when the magic
attributes are requested.  The code is a modified version of that used
in the ad2oLschema tool (now shared).

The schema_fsmo module handles the insertion of the generated result.

As such, this commit also removes these entries from the setup/schema.ldif

Metze's previous stub of this functionality is also removed.

Andrew Bartlett
(This used to be commit c7c32ec7b4)
2008-08-15 20:40:57 +10:00
Andrew Bartlett
b4691ad560 Use common code to fill in allowedAttributes in kludge_acl.
This code is now in common with ad2oLschema.

Andrew Bartlett
(This used to be commit 0a797388ca)
2008-07-11 15:11:32 +10:00
Andrew Bartlett
83d90d6cd6 Make ad2oLschema even simpler, by moving the heavy work into dsdb.
This will allow the kludge_acl and schema code to leverage the same
work.  (We might even get schema validation soon! :-)

Andrew Bartlett
(This used to be commit cecd04ce1f)
2008-07-10 15:52:44 +10:00
Stefan Metzmacher
db0a105aae schema_fsmo: move fsmo info into struct dsdb_schema
metze
(This used to be commit 8538d305c8)
2008-07-01 16:55:43 +02:00
Jelmer Vernooij
7d5987c2e0 Remove uses of global_loadparm.
(This used to be commit 138aaef078)
2008-02-19 13:39:27 +01:00
Jelmer Vernooij
71e2cafe96 r26483: Merge ldb module dependency fixes, fix auth python module.
(This used to be commit 85eeecf997)
2007-12-21 05:50:41 +01:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Andrew Bartlett
4e697b288b r24060: Fix bug #4806 by Matthias Wallnöfer <mwallnoefer@yahoo.de>: We need to
include the attribute allowedChildClassesEffective for MMC to allow
the creation of containers.

This may need further refinement, but it seems to work for now.

Andrew Bartlett
(This used to be commit d053b8e218)
2007-10-10 15:01:21 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
41c5453507 r21839: add my email address
metze
(This used to be commit e3be33c1d9)
2007-10-10 14:49:35 -05:00
Stefan Metzmacher
1e41323991 r20420: create infrastructure to convert attribute values from drsuapi to ldb
metze
(This used to be commit 17c52ed276)
2007-10-10 14:30:34 -05:00
Stefan Metzmacher
d97302d539 r20405: add an array with attribute syntexes
metze
(This used to be commit 1a21eb7000)
2007-10-10 14:30:24 -05:00
Stefan Metzmacher
40e7f36212 r20382: systemAuxiliaryClass and auxiliaryClass are also multivalued attributes
metze
(This used to be commit 5440c0a99f)
2007-10-10 14:30:20 -05:00
Stefan Metzmacher
3710a7ae99 r20331: the last entry in the oid mapping array which starts with 0xFF
is the content of the schemaInfo attribute of the schema head object

metze
(This used to be commit bfb7756bb0)
2007-10-10 14:29:42 -05:00
Stefan Metzmacher
97d066464b r20306: remove the static oid mapping table
and attach the table to the dsdb_schema

metze
(This used to be commit df63995ec5)
2007-10-10 14:29:36 -05:00
Stefan Metzmacher
c5571c7c39 r20221: - move the dsdb_schema, dsdb_attribute, dsdb_class structs into
a generic location
- this struct should be also used by the dsdb/samdb/ldb_modules/schema.c
  module later
- add functions to map from LDAP OID values to uint32_t values
- add torture test for the OID => uint32 mapping code

metze
(This used to be commit 58ba6ec195)
2007-10-10 14:29:23 -05:00