1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

243 Commits

Author SHA1 Message Date
Andrew Tridgell
c93a182a0d s4-schema: added some debug for bad attributes 2010-01-08 18:24:53 +11:00
Andrew Tridgell
f6cf895951 s4-schema: added generic attributeID conversion functions
When we get one we haven't seen before, we can work out the right type
automatically in most cases.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:04 +11:00
Andrew Tridgell
f7517e6256 s4-schema: added dsdb_attribute_by_lDAPDisplayName_ldb_val
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:04 +11:00
Andrew Tridgell
cd65ce8a18 s4-schema: make ldb_val to string comparison safer with nul termination
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08 13:03:04 +11:00
Kamen Mazdrashki
3352e5d7ba s4/dsdb_schema: Load msDS-IntId value separately when loading from LDB
This way we have consistent behavior when loading from DRSUAPI
and from LDB.
2010-01-08 13:03:04 +11:00
Kamen Mazdrashki
25238110df Revert "s4-schema: Set ATTID in schema cache from "msDS-IntId""
This reverts commit 4e8ad284f5813413fdec8426f11e24570d22549b.
2010-01-08 13:03:04 +11:00
Kamen Mazdrashki
9871f52bd3 s4/dsdb_schema: use msDS-IntId value for attribute look-up 2010-01-08 13:03:03 +11:00
Kamen Mazdrashki
a44ae10c77 s4/dsdb_schema: fetch msDS-IntId value during SCHEMA replication 2010-01-08 13:03:03 +11:00
Kamen Mazdrashki
a7b3891fb5 s4/dsdb_schema: GET_UINT32_DS() macro to use supplied default value instead of 0 2010-01-08 13:03:03 +11:00
Andrew Tridgell
c3061794ef s4-dsdb: use ldb_val_to_time() instead of ldb_string_to_time() 2010-01-02 08:16:55 +11:00
Andrew Tridgell
9f02898080 s4-schema: don't fill in the extended DN with a zero GUID
sometimes windows sends us a zero GUID in a DRS DN.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:52 +11:00
Andrew Tridgell
d4853fed00 sd-schema: order DRS classes on the wire in reverse order
windows sends objectclasses in DRS in the opposite order to what LDAP
uses
2010-01-02 08:16:52 +11:00
Andrew Tridgell
b1db66a501 s4-dsdb: allow the component name to be specified in dsdb_get_extended_dn_guid()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
0c362597c0 s4-schema: fixed the sorting of schema attributes
another case of unsigned int subtracting breaking sorts. This one
surfaced now as attributeID_id now can be larger than 2^31
2009-12-21 23:45:23 +11:00
Kamen Mazdrashki
ad35153ef4 s4-drs: Implement constraints on ATTID values in prefixMap
Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:45:18 +11:00
Kamen Mazdrashki
9f6c81874f s4-drs: Save prefix map using LDB_CONTROL_AS_SYSTEM control
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:45:00 +11:00
Kamen Mazdrashki
4e8ad284f5 s4-schema: Set ATTID in schema cache from "msDS-IntId"
According to http://msdn.microsoft.com/en-us/library/cc223224%28PROT.13%29.aspx
some Attributes OIDs may not use prefixMap.
Setting ATTID in Schema Cache here should work, although
this code snippet should be moved in separate function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21 23:44:29 +11:00
Andrew Tridgell
ec74ffa8f0 s4-schema: a unsigned comparison bug in the schema code 2009-12-21 23:41:08 +11:00
Nadezhda Ivanova
4deaa84ce4 Fixed a problem with duplicate values of allowedAttributesEffective. 2009-12-15 12:02:20 +02:00
Andrew Tridgell
c7c97b61ae s4-schema: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
d35b7d0aa4 s4-schema: use binsearch.h 2009-12-10 17:51:29 +11:00
Andrew Tridgell
81bc561330 s4-dsdb: simplify schema code using new GUID functions 2009-12-10 17:51:27 +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
Kamen Mazdrashki
83b41aa959 s4/schema(tort): Refactor DSDB-SYNTAX test for better performance
Test was implemented as a test fixture so that setup/teardown
occurs only once.
This should impact test performace as long as provision_get_schema()
is a slow function (especially when debugging)
2009-11-23 14:15:06 +01:00
Kamen Mazdrashki
1bf31f343c s4/schema: Object(OR-Name) syntax handling for DRS calls
OR-Name syntax through DRS calls looks like DN-Binary syntax
2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
bef4e25b1f s4/schema(tort): Inject authOrig attribute into schema loaded for tests 2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
d03d15d0cb s4/schema(tort): Add test for Object(OR-Name) syntax 2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
aa238ff6ea s4/schema(tort): Test LDB_SYNTAX_DN with extended_dn in [GUID;SID;DN] form 2009-11-23 14:15:05 +01:00
Stefan Metzmacher
4532f683a7 s4:dsdb/schema: let schema_supclasses() return the correct pointer
str_list_unique() changes the pointer via talloc_realloc().

metze
2009-11-17 09:00:50 +01:00
Andrew Bartlett
e9f4dbce64 s4:schema Add the GUID to each defaultObjectCategory when loading from LDIF
This makes these full extended DNs, so we set the right values into
the database, even before we actually set the schema objects
themselves.

Andrew Bartlett
2009-11-17 10:38:03 +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
Andrew Bartlett
58ded23b86 s4:dsdb Break up 'parse a DN from DRSUAPI' into a subfunction
This should make it easier to call this function from the DRS schema
load code, rather than duplicate it.

(we may do the same with other functions in future).

Andrew Bartlett
2009-11-17 10:38:01 +11:00
Andrew Bartlett
a9f6a56227 s4:dsdb/schema Add more unit tests for DN+Binary syntaxes 2009-11-12 16:34:43 +11:00
Andrew Bartlett
081d57345f s4:dsdb/schema Allow a schema set when bound against a remote LDAP server 2009-11-12 16:34:15 +11:00
Andrew Bartlett
2a601719f2 s4:dsdb Add expected value tests for most DRS syntax conversions
I've left out those for which I could not find an expected value in my
default Windows 2003 server's database, and the values that rely on
the current prefix map at the time.

Andrew Bartlett
2009-11-12 16:34:12 +11:00
Andrew Bartlett
9ba1870fb9 s4:Fix regression in dsdb_dn code - all parses of the DN would be rejected
This is most likely the cause of the DRS replication failures I
observed with my changes.

Andrew Bartlett
2009-11-12 16:34:11 +11:00
Andrew Bartlett
d6563801d1 s4:dsdb/schema Simplify schema loading from ldb messages
It turns out that we always add the class/attribute to the schema.
2009-11-12 16:34:09 +11:00
Andrew Bartlett
f0d43e9e56 s4:dsdb Use new dsdb_dn code in LDB modules and Samba4 schema
This converts the code from using the binary DN code in ldb_dn to
using a special Samba-specfic wrapper around ldb_dn.

We also use the dsdb_dn code for DN+Binary and DN+String comparisons
(changed from treating them as Binary blobs)

Andrew Bartlett
2009-11-12 16:34:04 +11:00
Kamen Mazdrashki
0f531e3a2a s4/drs: Refactor to be more SAMBA.Coding style compliant
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:50 +01: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
b9dd44ee39 s4/drs: dsdb_create_prefix_mapping() refactored
TODO: this function may be refactored further.
Actually we don't need to look up for the OID supplied,
but just call sdb_schema_pfm_make_attid() - it will
search for the OID anyway and add it if necessary

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:48 +01:00
Kamen Mazdrashki
9405377a70 s4/drs: prefixMap lookup by full_OID implementation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:48 +01:00
Kamen Mazdrashki
1aae751a68 s4/drs: dsdb_write_prefixes_from_schema_to_ldb() refactored
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:47 +01:00
Kamen Mazdrashki
82539b7d66 s4/drs: dsdb_read_prefixes_from_ldb() refactored
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:46 +01:00
Kamen Mazdrashki
9da33436e4 s4/drs: refactor dsdb_load_oid_mappings_ldb() to use _dsdb_prefixmap_from_ldb_val()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:45 +01:00
Kamen Mazdrashki
5381d8d157 s4/drs: Load prefixMap from ldb_val moved in separate function
It is to be used later in several places when we need such conversion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:45 +01:00
Kamen Mazdrashki
fc05386c0d s4/drs: dsdb_schema_pfm_from_drsuapi_pfm() to accept partial drsuapi_prefixMap
"partial drsuapi_prefixMap" is a prefix map without last entry
being special - i.e. map that does not contains schema_info entry.

Test for dsdb_schema_pfm_from_drsuapi_pfm() were also extended to
cover both 'full' and 'partial' map conversion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:44 +01:00
Kamen Mazdrashki
ba4d87f817 s4/drs: dsdb_map_int2oid() replaced by dsdb_schema_pfm_oid_from_attid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:43 +01:00
Kamen Mazdrashki
01302b8202 s4/drs: dsdb_map_oid2int() replaced by dsdb_schema_pfm_make_attid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:43 +01:00