1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

27 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
f905ddc104 s4:dsdb/schema: make dsdb_schema_pfm_add_entry() public and more useful
We allow a hint for the id from the remote prefix map.

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

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 Bartlett
11e716ae07 dsdb-schema: Print clear debug message when we find a OID in our local DB we cannot convert
We need to work out why we are unable to make a mapping for an OID in our database, because
we should not have been able to add it without such a mapping.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-16 19:02:03 +02:00
Gregor Beck
85b145d745 s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Matthias Dieter Wallnöfer
912faf1b08 s4:dsdb/schema/schema_* - adaptions needed for removed "const" on OIDs 2010-12-21 15:10:37 +11:00
Kamen Mazdrashki
16bd9dd7ae s4-dsdb/prefixMap: Add prefixMap shallow copy function 2010-12-01 13:01:16 +02:00
Kamen Mazdrashki
3ab75524ee s4-prefixMap: dsdb_schema_pfm_oid_from_attid() to use const prefixMap
It is not supposed to change supplied prefixMap
2010-11-11 18:54:20 +00:00
Kamen Mazdrashki
0aeb08e2eb s4-attid: Uppercase ATTID type constants
Thanks Metze for noting this!

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Mon Nov  8 23:06:41 UTC 2010 on sn-devel-104
2010-11-08 23:06:41 +00:00
Kamen Mazdrashki
0fc2427224 s4-prefixMap: split dsdb_schema_make_attid() function into read-only and
read-write functions.
dsdb_schema_make_attid() may change prefixMap implicitly
and this is not always desired behavior.
The problem was that
(1) callers had no control on this behavior
(2) callers had no way to know wheter prefixMap has been
    changed which can lead to hard to find bugs like
    prefixMap is changed in read operation
2010-10-26 22:17:41 +03:00
Kamen Mazdrashki
5e108fc5f9 s4-prefixmap: Use WERR_NOT_FOUND when OID is not found in current prefixMap
rather than WERR_DS_NO_MSDS_INTID.
WERR_DS_NO_MSDS_INTID is intended to be used for msDsIntId
attribute values handling
2010-10-26 22:17:40 +03:00
Kamen Mazdrashki
f06d98764a s4-dsdb-schema_prefixmap: return WERR_DS_NO_ATTRIBUTE_OR_VALUE when ATTID is not found
rather than WERR_INTERNAL_ERROR - it is not internal error!
2010-09-21 00:15:24 +03:00
Kamen Mazdrashki
395b09c1b6 s4-dsdb-schema_prefixmap: Print debug message when internal failure occurs 2010-09-21 00:15:24 +03:00
Kamen Mazdrashki
aedefd3e99 s4-prefixMap: use dsdb_schema_info_blob_is_valid() for schemaInfo blob validation
This fixes a leaking dsdb_schema_info object also.
2010-09-17 13:53:03 +03:00
Kamen Mazdrashki
c3d7798991 s4/dsdb: Use dsdb_schema_info object to verify schema_info blobs 2010-04-09 12:21:31 +03:00
Matthias Dieter Wallnöfer
5a54b204c3 s4:schema - Change also here counters to "unsigned" where needed
Counters which are used in the way  "for (i = 0; array[i] != NULL; i++)" I
modified to "unsigned" since for sure we don't want to have negative array
indexes there.
2010-03-07 19:01:15 +01: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
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
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
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
b54ec122b2 s4/drs: Move schema_prefixMap allocation in separate function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:40 +01:00
Kamen Mazdrashki
6210237b5a s4/drs: schema_prefixMap to/from drsuapi_prefixMap conversion implementation
Along with this, dsdb_schema_pfm_contains_drsuapi_pfm()
function is implemented to replace previous implementation
for dsdb_verify_oid_mappings_drsuapi().
Name of the function clearly implies how week this verification is,
as currently it is used to indicate "Schema modified on remote"
condition.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:39 +01:00
Kamen Mazdrashki
3fe4310df7 s4/drs: Implement binary-oid-lookup into prefixMap
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:38 +01:00
Kamen Mazdrashki
f4475368f0 s4/drs: Move making of partial-binary-oid to a separate function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:37 +01:00
Kamen Mazdrashki
39ab7b8ebd s4/drs: Fix memory leek in prefixMap
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:37 +01:00
Kamen Mazdrashki
9393d94ad4 s4/drs: prefixMap main interface implementation
Currenly implemented functions are:
dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid()
and dsdb_schema_pfm_oid_from_attid()
2009-10-21 11:49:51 +03:00
Kamen Mazdrashki
784e0c199e s4/drs: prefixMap module initial definition 2009-10-16 12:54:14 +03:00