1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-23 20:59:10 +03:00
Commit Graph

412 Commits

Author SHA1 Message Date
4c32d8f1a7 Load the schema for provision-backend in a transaction
Loading data in a transaction is faster than without.

Andrew Bartlett
2009-03-06 12:14:08 +11:00
8352650fee Allow ms_schema.py to produce output much like minschema_wspp
I've patched the new ms_schema.py (which was intended to be used as a
library) to function as minschema_wspp if invoked standalone. Although
this is less robust than minschema_wspp on incorrect data, having two
programs doing the same thing might not be good idea.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-03-05 17:03:13 +11:00
17aac8cad2 Remove ad2oLschema, insted call it directly from provision-backend
This removes a level of indirection via external binaries in the
provision-backend code, and also makes better use of our internal code
for loading schema from an LDIF file.

Remaining to do: Sort the output again, as the load from LDIF is
unsorted (also needed because the normal LDB load from sorted input is too slow
anyway, and is only needed here).

Andrew Bartlett
2009-03-05 16:52:11 +11:00
41760c18bd Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-05 12:24:35 +11:00
952bdffaad Don't print the admin password if we don't set one.
For example, if we don't create the admin user (perhaps expecting
users to be in LDAP already, or we are due an incoming replication) we
should not confuse the administrator by printing a unused password.

Andrew Bartlett
2009-03-04 14:02:35 +11:00
cdbc00bb52 Fix test_surrounding in samba4.rpcecho.python. 2009-03-02 05:07:30 +01:00
258ae4cec5 Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
	source4/scripting/python/samba/provision.py
2009-02-25 12:49:37 +01:00
8249383efb Add the new, updated AD schema file from Microsoft
Also remove the copy of the licence text from licence.txt, to ensure
we don't get variations between the copies.

Andrew Bartlett
2009-02-25 10:40:42 +11:00
8be9941354 Don't parse the schema data twice 2009-02-25 10:40:42 +11:00
8d63387744 Tolerate more whitespace errors
We need to trim trailing spaces in the Microsoft-supplied schema.

Andrew Bartlett
2009-02-25 10:40:42 +11:00
f83e754ae6 Create schema.ldif at runtime directly from ad-schema files
Here's a first attempt at moving the minschema_wspp code into a
library as Andrew requested. Since this script no longer has to
generate CN=aggregate, I've simplified it quite a bit to a level where
it almost does a line-by-line translation. This is faster and simpler,
but it may not catch as many errors in the ad-schema files as the
previous versions did.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-25 10:40:41 +11:00
503d15e8df Updates to the recent cn=config support for the OpenLDAP backend
- removed workaround for olcSyncprovConfig - creation (works perfect now
with 2.4.15, release was today)
- added 1 message-helpline, which is displayed when running
provision-backend with olc and/or mmr setup
- corrected 1 wrong slapcommand-helpline
- slapd.conf is removed now in case of olc-setup
- added 1 copyright-line to provision.py and provision-backend

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-25 10:39:35 +11:00
31f2cddcf5 Added mmr and olc to the OpenLDAP backend provisioning-scripts
These extensions add mmr (multi-master-replication) and olc
(openldap-online-configuration) capabilities to the
provisioning-scripts (provision-backend and provision.py), for use
with the openldap-backend (only versions >=2.4.15!).

Changes / additions made to the provision-backend  -script:
added new command-line-options:
--ol-mmr-urls=<list of whitespace separated ldap-urls> for use with mmr
(can be combined with --ol-olc=yes),
--ol-olc=[yes/no] (activate automatic conversion from static slapd.conf
to olc),
--ol-slaptest=<path to slaptest binary> (needed in conjunction with
--ol-olc=yes)

Changes / additions made to the provision.py -script: added
extensions, that will automatically generate the chosen mmr and/or olc
setup for the openldap backend, according to the to chosen parameters
set in the provision-backend script

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-24 21:34:44 +11:00
b9cf189404 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:02:26 +01:00
dcb2e7d577 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:00:09 +01:00
10c047c6f4 Fix finding of setup data. 2009-02-24 00:58:29 +01:00
6b8b7665bd paper over failure to reprovision with os.unlink()
We need to figure out why the deletes on the database fail, but for
now doing an unlink of templates_tdb isn't too bad.

Andrew Bartlett
2009-02-18 17:44:07 +11:00
762fdc8c5c Provide a SamDB TestCase-class that can be used by OpenChange. 2009-02-12 16:00:11 +01:00
7048e75aee Use created loadparm context, rather than the one specified on the command-line. 2009-02-12 15:58:11 +01:00
be9a4157f0 Catch specific exceptions, rather than catching everything, which might hide other exceptions silently. 2009-02-11 19:04:33 +01:00
9e71fef57b Use convenience function for finding setup dir in SaMDB tests. 2009-02-11 18:45:51 +01:00
53b59aa2cf Use convenience function for finding setup_dir based on location of
python module.
2009-02-11 18:44:57 +01:00
ddb4db7c65 Move some samdb-specific code out of provision. 2009-02-11 18:31:52 +01:00
d9e94bf336 Make it possible to override the setup path. 2009-02-11 18:17:00 +01:00
f13895851f Cancel transactions when exceptions are raised. 2009-02-11 17:54:58 +01:00
ebb929779b Remove obsolete samr Python module - use samba.dcerpc.samr instead. 2009-01-22 15:23:32 +01:00
b876478219 Make sure server_role gets initialized in backend provisioning code -
fixes test.
2009-01-19 21:14:37 +01:00
9fa6fb3d9f Print more useful suggestion for the main provision command line 2009-01-19 12:39:57 +11:00
673ca5145c Find default smb.conf path correctly, when it was not specified on the
command-line.
2009-01-16 15:05:15 +01:00
447f266887 Only do special DN tracking for normal DNs in OpenLDAP backend.
This means trying (again, harder), not to do this for DN+Binary and
DN+String attributes.

Andrew Bartlett
2009-01-09 12:08:11 +11:00
05f97d3235 Fix typo 2009-01-06 16:23:29 +01:00
d22adc14a9 More work to have OpenLDAP accept the full AD schema
We need to avoid handling DN+Binary and DN+String with the refint
module for now, as this is a currently unsupported syntax.

Also rename entryTTL to avoid a conflict with the operational
attribute of the same name.

Andrew Bartlett
2009-01-05 12:38:47 +11:00
00b61ff2cf samba.tests.samdb: Fix test after merger of samba.security and
samba.dcerpc.security
2008-12-23 11:44:10 +01:00
2227860a79 Fix more tests, improve repr() functions for various Python types. 2008-12-21 23:05:35 +01:00
7e651c7ef3 Simplify customization of pidl-generated Python modules. 2008-12-21 21:10:40 +01:00
a32194033a Move tests for ParamFile. 2008-12-21 16:39:17 +01:00
676919872d Provide simple Python replacement for ParamFile, which currently exists
with a lot of overhead.
2008-12-21 15:55:23 +01:00
6efb7ff981 Fix various Python-related bugs. 2008-12-21 07:34:27 +01:00
eeb25cf548 Fix more introduced regressions in new bindings. 2008-12-21 04:36:16 +01:00
2e7a6cb6bf py: Fix initialisation of subtypes, fix segfaults. 2008-12-21 03:08:14 +01:00
0d585a67ed Support subtypes of ldb.Ldb. 2008-12-20 23:00:23 +01:00
5076c64d43 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-19 21:47:45 +01:00
6998ef4fe0 Avoid use of parentheses in Python import statements, as it's not supported by Python2.3. 2008-12-19 21:47:31 +01:00
f52fc2f90e Move aggregate schema stub to it's own file
This should make it easier to import just the schema entries from the
WSPP docs.

Andrew Bartlett
2008-12-19 09:51:42 +11:00
21702bfcde Cope with slight changes in tdb API. 2008-12-18 20:43:05 +00:00
61a2d5c878 Use plain Python C API for registry module, rather than SWIG. 2008-12-18 16:49:33 +00:00
7a5b6a2ea1 Handle different failure modes when we wipe the db in provision
We didn't handle the mode where we can't load the main sam.ldb due to
the modules being 'wrong', and when we did remove the file, we didn't
wipe the partitions.
2008-12-18 17:17:56 +11:00
ebe1e923c8 s4:provision: use extended_dn_out_ldb or extended_dn_out_dereference depending on the backend
This just changes the existing stratagy of loading different modules
for the OpenLDAP backend to also include extended_dn_out_*

When we provision the OpenLDAP backend, we make sure to include the
'deref' overlay (which must be made available by the OpenLDAP build)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
1f28541a24 s4:dsdb: split extended_dn into extended_dn_in, extended_dn_out and extended_dn_store.
By splitting the module, the extended_dn_in and extended_dn_store
moudles can use extended_dn_out to actually get the extended DN.  This
avoids code duplication.

The extended_dn_out module also contains a client implementation of
the OpenLDAP dereference control (draft-masarati-ldap-deref-00).

This also introduces a new control
'DSDB_CONTROL_DN_STORAGE_FORMAT_OID' to ask the extended_dn_out module
to return whatever the 'storage format' is.  This allows us to work
with both OpenLDAP (which performs a dereference at run time) and LDB
(which stores the GUID and SID on disk).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
6069407ed1 Fix rpcecho test. 2008-10-21 14:23:42 +02:00