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

20166 Commits

Author SHA1 Message Date
Kamen Mazdrashki
9e4beef614 s4/drs(tort): 'DsSyncBindInfo.pipe' renamed - 'pipe' is a system call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:42 +11:00
Kamen Mazdrashki
b0de573629 s4/drs(tort): 'DsPrivate.pipe' renamed - 'pipe' is a system call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:28 +11:00
Andrew Bartlett
b13518e4e8 s4:dsdb With these workarounds, we now pass the RPC-DSSYNC test 2009-11-17 10:38:09 +11:00
Andrew Bartlett
5c3ef6dbae s4:provision Split up reference creation, load schema earlier in the stack
The schema needs to be loaded above the extended_dn_out modules as
otherwise we don't get an extended DN in the search results.

The reference split is to ensure we create references after the
objects they reference exist.

Andrew Bartlett
2009-11-17 10:38:04 +11: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
07953142a4 s4:dsdb Rework samdb code to use 'storage format' DNs for defaultObjectCategory
It is important to always ensure that this attribute has an extended
DN if the rest of the database stores things that way.

The knowlege of what format the DN is stored on disk with is passed
around in an LDB opaque.

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Andrew Bartlett
0238147a85 s4:provision Generate a random objectGUID for each schema record
This is needed to then create extended DNs with GUID attributes in
them, when importing from the LDIF

Andrew Bartlett
2009-11-17 10:38: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
Andrew Bartlett
6710becbd4 s4:dsdb Use the new flags to dsdb_module_search in schema_load
This loads the defaultObjectCategory DN as an extended DN, so we can
apply it, with the associated GUID, when setting this on records in
the objectClass module.

Previously we would not store the extended DN components for
objectCategory.

Andrew Bartlett
2009-11-17 10:38:01 +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
41ce3dc0c3 s4:dsdb Add 'dsdb_flags' to dsdb_module_search() to enable often-used features
These flags, also on dsdb_module_search_dn() allow us to add commonly
set controls to this pre-packaged blocking search, without rebuilding
the whole function in each caller.

Andrew Bartlett
2009-11-17 10:38:01 +11:00
Matthias Dieter Wallnöfer
5c54c73c0e s4:SAMLDB module
- Add more "\n" to make sure that error messages are displayed immediately
- Add a "NULL" in a attribute list
2009-11-16 17:57:50 +01:00
Matthias Dieter Wallnöfer
e853dd763b Revert "s4:dsdb/repl/replicated_objects - Applicate also here the new "lDAPDisplayName" generator"
This reverts commit df95d5c292.

abartlet pointed out in a post on the samba-technical list that this isn't
necessary at all (lDAPDisplayName normalisation algorithm). Rather it breaks
functionality of the replication.
2009-11-16 17:01:43 +01:00
Andrew Bartlett
8880170978 s4:dsdb LDB attribute lists must always be a static const char **.
(If they are not, then due to the async code, they will cause a segfault as they reference a reclaimed portion of the stack).

Andrew Bartlett
2009-11-16 10:19:42 +11:00
Endi S. Dewata
8e5f5e3f05 s4:provision - Removed dependency on full Samba 3 schema from FDS 2009-11-16 07:57:40 +11:00
Nadezhda Ivanova
55d2cec640 Fixed some major bugs in inheritance and access checks.
Fixed sd creation not working on LDAP modify.
Fixed incorrect replacement of CO and CG.
Fixed incorrect access check on modify for SD modification.
Fixed failing sec_descriptor test and enabled it.
Fixed failing sd add test in ldap.python
2009-11-15 22:31:44 +02:00
Wilco Baan Hofman
df3451aec0 Fix writing corrupt registries because of hardcoded version string in IDL.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:51 +01:00
Wilco Baan Hofman
5a7d48f82b Fix writing corrupt REG_SZ to the registry.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Wilco Baan Hofman
45bb24e939 Fix trailing garbage in the hbin block.
This specifically fixes a problem showing extra bytes of garbage in list and
print in regshell, even though the vk.data_length has the correct size.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Zahari Zahariev
1e984e6630 Added tests for descriptor inheritance on ldap modify.
Fixed some expected owners and groups.

Signed-off-by: Nadezhda Ivanova <nadezhda.ivanova@postpath.com>
2009-11-15 19:26:02 +02:00
Matthias Dieter Wallnöfer
cc080742bd ldb:python bindings - add a context on "py_ldb_delete"
So the converted DN will be freed after usage.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
6cf43db7fc s4:ldap.py - enhance schema addition test
Don't add only a new objectclass but also a new attribute. Plus let now the
server itself calculate the "lDAPDisplayName" attribute and compare the result.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
df95d5c292 s4:dsdb/repl/replicated_objects - Applicate also here the new "lDAPDisplayName" generator
Also here we've to be sure to generate the attribute correctly if it doesn't
exist yet.
2009-11-15 14:26:41 +01:00
Andrew Bartlett
2c7294bd8f s4:SAMLDB module - Add support for required and generated schema attributes
This missing support found by Microsoft test suite at AD interop event.

Patch by Andrew Bartlett
Enhancements by Matthias Dieter Wallnöfer
2009-11-15 14:26:40 +01:00
Matthias Dieter Wallnöfer
da3d471d10 s4:samdb util - add a call for generating a correct "lDAPDisplayName"
This is needed for the SAMLDB module enhancement regarding schema objects.
The algorithm in pseudo code is located in MS-ADTS 3.1.1.2.3.4.
2009-11-15 14:26:40 +01:00
Matthias Dieter Wallnöfer
8e320aea71 s4:ldap.py - Deactivates some at the moment pointless test parts
I think those parts should be deactivated since they're result set checks for
lookups which are commented out already.
2009-11-15 10:38:30 +01:00
Erick Nascimento
a3632f22ec s4-drs: DsExecuteKCC() implementation
I implemented the DsExecuteKCC() handling code on kccsrv_execute_kcc().

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-14 12:11:02 +11:00
Andrew Bartlett
ca12e7bc8f s4:heimdal Import generated files from heimdal tree
We should be able to rebuild these, but a cp is easier :-)
2009-11-13 23:19:06 +11:00
Andrew Bartlett
4f8ba5ad6a s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1) 2009-11-13 23:19:05 +11:00
Andrew Bartlett
5bc87c14a1 s4:heimdal: import lorikeet-heimdal-200909210500 (commit 290db8d23647a27c39b97c189a0b2ef6ec21ca69) 2009-11-13 23:19:05 +11:00
Andrew Tridgell
c8884e1cf2 s4-ldb: changed the DN checks for \n to warnings
a \n is sometimes allowed in AD (eg in deleted DNs). Until we know
when is really is allowed, treat it as a warning only.
2009-11-13 19:32:47 +11:00
Andrew Tridgell
dbae29de1c s4-ldb: make DN escaping/unescaping consistent
The DN escape function was using the form \c where c is any
character. The unescape function was using \XX where XX is a 2 digit
hex number. The asymmetry led to quite a few problems when we start to
deal with DNs containing escape chars, such as CN=foo\0ADEL:XXX. The
result was a DN that was not accessible.

This patch changes the escaping to follow RFC2253 much more
closely. We accept either type of escape, and produce the two types of
escape, depending on the character being escaped
2009-11-13 19:32:46 +11:00
Stefan Metzmacher
21644c5fed s4:heimdal_build: allow flex-2.5.35 with bison-2.3
metze
2009-11-12 18:51:21 +01:00
Andrew Bartlett
0d6c3058b2 s4:dsdb Make callbacks in extended_dn_out clearer to follow 2009-11-12 22:23:23 +11:00
Andrew Bartlett
5740648279 s4:selftest Mark the RPC-DSSYNC test as knownfail for now
We need to work on the provision or LDB modules to avoid DN attributes
without GUIDs (caused because the target does not exist at creation
time).

Andrew Bartlett
2009-11-12 22:23:22 +11:00
Andrew Bartlett
68639bfd64 s4:libcli/ldap Add 'relax' OID to known network representations
This patch, inspired by a patche by Endi S. Dewata
<edewata@redhat.com>, allows this control to be passed to the LDAP
backend.

Andrew Bartlett
2009-11-12 22:23:22 +11:00
Endi S. Dewata
f3bc54a8f1 s4:provision - Added LDBBackend and ExistingBackend. 2009-11-12 22:23:22 +11:00
Endi S. Dewata
55bb60a5db s4:provision - Added constructors for FDSBackend and OpenLDAPBackend. 2009-11-12 22:23:22 +11:00
Endi S. Dewata
1564067fbc s4:provision - Added setup() method in LDAPBackend. 2009-11-12 22:23:21 +11:00
Endi S. Dewata
ba12eb99a0 s4:provision - Moved provision_xxx_backend() into backend-specific provision() method. 2009-11-12 22:23:21 +11:00
Endi S. Dewata
be766a3841 s4:provision - Added start() method in LDAPBackend. 2009-11-12 22:23:21 +11:00
Endi S. Dewata
fbc5696e38 s4:provision - Added initial implementation of FDSBackend and OpenLDAPBackend. 2009-11-12 22:23:21 +11:00
Andrew Bartlett
bbe4a9cf0f s4:repl_meta_data Parse linked attributes with schema syntaxes
The bug here was that by assuming all linked attributes were 'normal
DNs', we would miss the binary portion of DN+Binary.

This patch then has us reparse the string to determine it's GUID, for
the GUID lookup, but maintains the binary porition into the on-disk
format.

Andrew Bartlett
2009-11-12 16:34:44 +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
95a12cdf21 s4:torture Use (some) torture_assert() calls in RPC-DSSYNC test 2009-11-12 16:34:23 +11:00
Andrew Bartlett
693ddf5ba0 s4:dsdb Improve debug message in extended_dn_out 2009-11-12 16:34:18 +11:00
Andrew Bartlett
06b234e811 s4:torture Remove _drs_util_verify_attids() from RPC-DSSYNC
I'm satisfied that the task this test does is already done by the time
we map the incoming schema, and process the objects.  If we have the
OID mapping wrong or incomplete, we will get any errors this test
found errors there.

(And this dramaticly reduces the test time, so we can now add
RPC-DSSYNC to 'make test').

Andrew Bartlett
2009-11-12 16:34:18 +11:00
Andrew Bartlett
6d1e60987b s4:torture/dsdb Add verification of the push-to-LDB functions in RPC-DSSYNC
This is done by comparing the values against the remote host's LDAP
server.

Andrew Bartlett
2009-11-12 16:34:17 +11:00
Andrew Bartlett
30a08005ca s4:torture Add const 2009-11-12 16:34:16 +11:00
Andrew Bartlett
ae72153daa s4:ldb Allow ldb_msg_canonicalize to handle empty elements
(These are deliberately there in DRS replication).

Andrew Bartlett
2009-11-12 16:34:15 +11:00