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

1453 Commits

Author SHA1 Message Date
Andrew Kroeger
fddcee6325 s4:setup: Use ms_display_specifiers script for provision.
Changed the provisioning to use the new script to parse the Microsoft-provided
DisplaySpecifiers LDIF file.
2009-09-07 11:18:18 +10:00
Andrew Kroeger
1a657b0413 s4:setup: Added script to parse Microsoft DisplaySpecifiers document.
Created this script based on the existing ms_schema.py script.

- Removed some unnecessary transformations that are only necessary for schema
  processing.
- Added capability to parse and properly output base64-encoded values.
- Removed unnecessary attributes based on what attributes were present (and also
  what were explicitly removed) from display_specifiers.ldif.
2009-09-07 11:18:18 +10:00
Andrew Tridgell
a959597637 s4: bring nsupdate-gss into the s4 tree
This is a perl script that does TSIG-GSS DNS updates against a AD
DC. The bind 9.5 nsupdate still doesn't seem to work with TSIG-GSS,
and we need a way to do DNS updates when we vampire a domain, so I
revived this ancient perl script and added a wrapper script that can
update DNS entries using our machine account credentials
2009-09-07 10:55:32 +10:00
Andrew Tridgell
ffd48a79ee s4:python fixed subunit tests of dcerpc
The version of the unitest python module in Ubuntu Jaunty doesn't seem
to support this many level of subdirectories. Moving the tests up one
level solves the problem.
2009-09-04 18:07:04 +10:00
Andrew Tridgell
617bbd913d allow setting of the debug level in python from C 2009-09-03 18:36:09 +10:00
Andrew Tridgell
b5f63160d4 repl_meta_data should only be included when we are a DC 2009-09-02 18:19:56 +10:00
Andrew Tridgell
199be936d8 move the repl_meta_data module up the ldb module stack
The repl_meta_data module needs to be above the linked_attributes
module, to allow linked_attributes to do its magic
2009-09-02 18:19:56 +10:00
Matthieu Patou
72fb26e9a4 s4: Create helpers functions related to provision
One for getting attributes with DN syntax, one for getting forward
linked attributes and one for getting the list of partition
2009-08-28 22:41:49 +10:00
Andrew Bartlett
160c197b84 s4:python Add helper to get at the domain SID 2009-08-27 19:40:21 +10:00
Andrew Bartlett
1a97bd915d s4:provision Ensure that @OPTIONS is mirrored into each partition
The previous patches to the provision system cut down on the number of
reconnects, and disabled the partition handling for part of the
process.  This means we lost the setting of @OPTIONS as a replicated
attribute into the partitions.

Andrew Bartlett
2009-08-26 17:37:01 +10:00
Andrew Bartlett
a1da91174b s4:provison Add prefixes to ldb using same code a later modify will use
This allows us to test out the code that will do the modify of the
prefixMap, and to provide the bindings that may assist a future
upgrade script.

Andrew Bartlett
2009-08-26 13:49:10 +10:00
Andrew Bartlett
b9ec6bb1eb s4:provision Only create references to our server DN after the self join
This will ensure that the GUID can be filled in correctly, and assist
us to validate DN targets in the future.

Andrew Bartlett
2009-08-26 13:48:35 +10:00
Andrew Bartlett
436d8b6e06 s4:python Fix the reprovision test by deleting 'deleted' objects too.
We were failing because CN=Deleted Objects, which is marked as
'deleted' itself, could not be re-added in a reprovision.

Andrew Bartlett
2009-08-25 16:28:44 +10:00
Andrew Tridgell
3dee92fcb9 fixed the build
the changes from Matthias didn't take account of url and lp being None
in some ldb python instances in 'make test'
2009-08-17 21:40:19 +10:00
Matthias Dieter Wallnöfer
7a79d16183 s4: Major rework of the LDB/SAMDB/IDMAP python bindings
- Centralise the lookups for the default domain (root) in the call "domain_dn"
- Reduce the LDB connections attempts ("connect" calls) from three to one
  - tools should load faster
- Make the LDB connection init more like the "ldb_wrap_connection" call
- Load the right UTF8 casefolder which fixes up problems with special characters
  (discovered by me: e.g. small "Umlaute" (ä, ö, ü, ...) in the DN weren't upcased
  - so records "seemed" lost in TDB)
2009-08-17 11:58:40 +02:00
Matthias Dieter Wallnöfer
0a46fd630e s4:pyglue Add a wrapper for loading the correct UTF8 casefolder
Needed for special characters (e.g. in German "Umlaute")
2009-08-17 11:58:39 +02:00
Matthias Dieter Wallnöfer
36f828bafb Revert "s4:samdb python bindings - we don't need the attributes here"
This reverts commit 53ef426e6f.

As abartlet pointed out this causes to load all attributes and therefore gives
us more here than we need (only the check for the DN)!
2009-08-17 11:06:39 +02:00
Andrew Tridgell
87921bf694 sigh - still not right 2009-08-17 17:50:26 +10:00
Andrew Tridgell
52108a19a4 fixed up add_foreign again
my last patch was not even close ...

I'll leave abartlet to work out how to fix the test case
2009-08-17 17:48:27 +10:00
Andrew Tridgell
905db32885 more fixups from provision changes
Andrew, can you please check this? The idmap.setup_name_mapping tests
look totally out of place here. I'm also not sure I captured your
intention with the other changes
2009-08-17 17:35:36 +10:00
Andrew Tridgell
f3e473ee72 fixed up some provision errors from the recent changes 2009-08-17 13:28:57 +10:00
Andrew Bartlett
e349316550 s4:provision Add comments to the provision script
Hopefully this will explain a bit more whey things are done the way
that they are done.

Andrew Bartlett
2009-08-17 11:47:14 +10:00
Andrew Bartlett
5f917d5f17 s4:provision Avoid one more call to ltdb_reindex
The Samba4 schema code (called via
samdb.set_schema_from_ldb(schema.ldb)) manages the @ATTRIBUTES and
@INDEXLIST records, so don't wipe them early.  The chances are that we
will not change them anyway.

Andrew Bartlett
2009-08-17 11:47:14 +10:00
Andrew Bartlett
df3ef12cf8 s4:provision Fix existing ldapi:// backend detection exception
Found by Oliver Liebel <oliver@itc.li>

Andrew Bartlett
2009-08-17 09:52:09 +10:00
Andrew Bartlett
2af06385ed s4:provision Make sure that we don't use Kerberos to our LDAP backend
This makes no sense, and just causes trouble - we are aiming for
DIGEST-MD5 or NTLM.

Andrew Bartlett
2009-08-17 09:51:01 +10:00
Andrew Bartlett
84ee0af244 s4:provison Print the LDAP backend admin username/password 2009-08-17 09:51:00 +10:00
Andrew Bartlett
e7bae2eb0a s4: Re-add --ldapadminpass as an option to provision
This should make setting up LDAP servers more predictable.

When not specified, it is random

Andrew Bartlett
2009-08-17 09:51:00 +10:00
Andrew Bartlett
052da4e4d7 s4:python Allow 'no such object' on the delete of the DN
This fixes the recursive delete in erase_partitions()

For reasons I cannot understand, it is possible to get 'no such
object' trying to delete a DN I just search for without error.  Oh
well...

Andrew Bartlett
2009-08-17 09:50:59 +10:00
Andrew Bartlett
410114e41c s4:provision Keep a single transaction for the erase and rebuild
Using a single transaction to both erase the bulk of the data and the
rebuild of that data means that the in-memory index list is
maintained, and not written out to disk until it is all compleated.
All the writes then occour at the end.

Andrew Bartlett
2009-08-17 09:50:59 +10:00
Andrew Bartlett
f87811f6b3 s4:provision Rework provision-backend into provision
This removes a *lot* of duplicated code and the cause of much
administrator frustration.  We now handle starting and stopping the
slapd (at least for the provision), and ensure that there is only one
'right' way to configure the OpenLDAP and Fedora DS backend

We now run OpenLDAP in 'cn=config' mode for online configuration.

To test what was the provision-backend code, a new --ldap-dryrun-mode
option has been added to provision.  It quits the provision just
before it would start the LDAP binaries

Andrew Bartlett
2009-08-17 09:50:58 +10:00
Andrew Bartlett
7a9030b7ce s4:provision Move helper functions back to provision
(These will be added back in a future commit)
2009-08-17 09:50:57 +10:00
Andrew Bartlett
14aff84adc s4:python Push some helper functions from SamDB into samba.Ldb
This makes it possible to do a bit more of the provision with Samba
helpers, but without some of the otherwise useful things (such as
loading in the global schema) that SamDB does.

Rewrite provision_erase to use a recursive search, rather than a
looping subtree search.  This is much more efficient, particularly now
we have one-level indexes enabled.

Delete the @INDEX and similar records *after* deleting all other
visible records, this hopefully also assists performance.

Andrew Bartlett
2009-08-17 09:50:57 +10:00
Andrew Bartlett
51d2d3df6d s4:schema Allow a schema load on an unconnected database
This helps ensure we don't load the schema too often in the provision
(allowing a reference in of the schema before the modules load).

Andrew Bartlett
2009-08-17 09:50:56 +10:00
Andrew Bartlett
346aa6e093 s4:schema Provide a way to reference a loaded schema between ldbs
This allows us to load the schema against one ldb context, but apply
it to another.  This will be useful in the provision script, as we
need the schema before we start the LDAP server backend.

Adnrew Bartlett
2009-08-17 09:50:56 +10:00
Matthias Dieter Wallnöfer
53ef426e6f s4:samdb python bindings - we don't need the attributes here 2009-08-14 01:56:34 +02:00
Matthias Dieter Wallnöfer
44dfb2902e s4: Better way to call "dom_sid_to_rid" from ldap.py 2009-08-14 00:14:15 +02:00
Matthias Dieter Wallnöfer
159a33a7d4 s4:test for "primaryGroupToken"
Tests for the right behaviour of this introduced constructed attribute.
Since we don't support the read-only-ness of those attributes yet, I commented
some lines out.
Also I had to add a function for python which converts domain SIDs in RIDs.
And a small fix for the "groupType" test.
2009-08-11 12:59:17 +02:00
Andrew Bartlett
7bc566a882 s4:provision Allow provision-backend to not run slapd for 'make test'
As the version of OpenLDAP required for Samba4 is fairly new, we don't
want to make it a requirement before this python code is run in 'make
test'.

As such, skip over the actual starting of slapd, but check the rest
runs alright (which still validates syntax and other modules).

Andrew Bartlett
2009-08-12 11:09:50 +10:00
Andrew Bartlett
6dc41bf27c s4:provision Make the --ol-slapd paramter take the full path to slapd 2009-08-12 10:01:48 +10:00
Oliver Liebel
28bcdf5266 s4:provision Rework and further automate setup of OpenLDAP backend
heres the summary of all changes/extensions:

- Andrew Bartlett's patch to generate indext
- Howard Chu's idea to use nosync on the DB included, but made optional

- slaptest-path is not needed any more (slapd -Ttest is used instead)
and is therefore removed. slapd-path is now recommended when
openldap-backend is chosen.
its also used for olc-conversion

- slapd-detection is now always done by ldapsearch (ldb module),
looking anonymous for objectClass: OpenLDAProotDSE via our ldapi_uri.

- if ldapsearch was not successfull, (no slapd listening on our socket)
slapd is
started via special generated slapdcommand_prov  (ldapi_uri only)

- slapd-"provision-process" startup is done via pythons subprocess.

- the slapd-provision-pid is stored under paths.ldapdir/slapd_provision_pid.

- after provision-backend is finished:
--- slapd.pid is compared with our stored slapd_provision_pid.
if the are unique, slapd.pid will be read out, and the
slapd "provison"-process will be shut down.
--- proper slapd-shutdown is verified again with ldb-search -> ldapi_uri
-> rootDSE.
--- if the pids are different or one of the pid-files is missing, slapd
will not be shut down,
instead an error message is displayed to locate slapd manually
--- extended help-messages (relevant to slapd) are always displayed,
e.g. the commandline with which slapd has to be started when everythings
finished
(slapd-commandline is stored under paths.ldapdir/slapd_command_file.txt))

- upgraded the content of the mini-howto (howto-ol-backend-s4.txt)
2009-08-12 10:01:48 +10:00
Matthias Dieter Wallnöfer
915b789c87 s4: Simplify two lines in the "samdb.py" file (cosmetic) 2009-08-06 12:35:47 +02:00
Jelmer Vernooij
8eff9f9a31 python: Cope with the dom_sid2 alias in pidl's python generating code.
This fixes some problems in the samr Python bindings that pidl was
(correctly) warning about.
2009-07-30 20:28:29 +02:00
Jelmer Vernooij
6768cfe624 DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
Use py_talloc_reference in DCE/RPC code, fixes
					access to SAMR pipe.
2009-07-30 20:04:42 +02:00
Andrew Bartlett
113621d96d s4:provision We no longer add krbtgt or kpasswd account into secrets.ldb 2009-07-29 09:07:49 +10:00
Andrew Bartlett
1887ad0a26 s4:provision Fix provision on FreeBSD
We were missing the 'cn' attribute, which we then prepare a sorted
list based on.  On Linux, strcmp(NULL, NULL) does not segfault, where
it does on FreeBSD.

Reported by Timur I. Bakeyev <timur@com.bat.ru>

Andrew Bartlett
2009-07-22 18:04:58 +10:00
Jelmer Vernooij
c80783eafd Re-add accidently removed shares test. 2009-07-20 13:34:50 +02:00
Jelmer Vernooij
478446f96d Remove unnecessary imports. 2009-07-19 18:51:15 +02:00
Jelmer Vernooij
7883897b8d python: Set right ldb modules directory when using system ldb. 2009-07-18 18:39:20 +02:00
Jelmer Vernooij
d356669492 Remove pyldb_util and simply duplicate the 5-line function it contains,
rather than creating a separate shared library for it.
2009-07-18 16:11:21 +02:00
Andrew Bartlett
271b5af92e s4:dsdb Handle dc/domain/forest functional levels properly
Rather than have the functional levels scattered in 4 different,
unconnected locations, the provision script now sets it, and the
rootdse module maintains it's copy only as a cached view onto the
original values.

We also use the functional level to determine if we should store AES
Kerberos keys.

Andrew Bartlett
2009-07-16 09:23:35 +10:00
Andrew Bartlett
ba58edd0bc Add a way to set an opaque integer onto a samdb
This will allow us to set some more flags into ldb during the provision.
2009-07-16 09:23:35 +10:00
Jelmer Vernooij
4d9a929f8d s4: Remove stub endpoint mapper script. 2009-07-03 00:59:30 +02:00
Andrew Tridgell
0fcd465340 show attribute values in sorted order to make comparison easier 2009-07-02 23:18:41 +10:00
Andrew Tridgell
465b879902 Changed ldb.ERR_NO_SUCH_OBJECT to LDB_ERR_NO_SUCH_OBJECT.
The LDB_ERR_NO_SUCH_OBJECT varient is not a defined variable. This
should improve error handling in our python code on some
systems. Unfortunately it still doesn't work on mine. I need to trap
Jelmer somewhere where he can't escape some day and force him to
divulge the deep druid secrets of python exception handling ....
2009-07-02 14:55:38 +10:00
Andrew Bartlett
1e6fb7d730 s4: Add tests and 'must change password' flags in setpassword and newuser
In particular, ensure that we can acutally change the password under
these circumstances.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
2afc6df9b4 s4:setup Add an option to 'setpassword' to force password change at next login 2009-06-18 13:49:30 +10:00
Jelmer Vernooij
57c514afec Remove outdated Python status file. 2009-06-18 00:54:17 +02:00
Jelmer Vernooij
8b82e3b1e3 Make fullschema script executable. 2009-06-17 20:52:43 +02:00
Jelmer Vernooij
308de544f4 python: Provide way to iterate over available shares. 2009-06-16 02:28:10 +02:00
Jelmer Vernooij
f7ada51c29 python: Add API for accessing available shares. 2009-06-16 02:28:10 +02:00
Nadezhda Ivanova
e9caf7d063 A script to compare the differences in nTSecurityDescriptor between 2 hosts
This script walks the schema, configuration and domain partitions of the locally
installed Ldb and a remote hosts and compares the descriptors disregarding the
difference in domain SID. The goal is to make sure a freshly provisioned Samba
has the correct descriptors so ACLs work correctly. It outputs the descriptors
in short SDDL, where the correct SIDs are to be replaced during provisioning.
Optionally it can be output as an LDIF file with the current local domain and
domain SIDs.
2009-06-11 18:54:32 +10:00
Timur I Bakeyev
fae921e938 Fix installation path of the subunit python modules.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-06-09 21:54:05 +02:00
Jelmer Vernooij
d5e6ae5cfc python: Fix samba4.dcerpc.rpcecho.RpcEchoTests.test_surrounding test. 2009-06-08 22:41:39 +02:00
Jelmer Vernooij
6ace18904d Fix more unresolved symbols. 2009-06-02 18:05:41 +02:00
Jelmer Vernooij
fe2b04b4bb python: Move helper functions for using param into a separate file rather
than linking against the python module.
2009-06-02 18:05:40 +02:00
Nadezhda Ivanova
ee4c1ed010 Modified SamDB to accept options like Ldb. 2009-05-27 21:08:35 +10:00
Andrew Bartlett
f128bfd449 Add str() for policy_handles.
Pair programmed with Jelmer
2009-04-21 12:06:04 +02:00
Andrew Bartlett
6f60a6e71a python/dcerpc: Custom implementations of policy_handle.__init__ and policy_handle.__repr__
pair-programmed with Jelmer
2009-04-21 11:53:00 +02:00
Andrew Bartlett
1856b999c8 python/rpc: Add custom GUID.__str__, GUID.__repr__, GUID.__init__ and GUID.__cmp__. 2009-04-21 11:14:11 +02:00
Jelmer Vernooij
03abc846ee Fix the valid NetBIOS name tests. 2009-04-20 11:11:25 +02:00
Andrew Tridgell
65ad2ced60 Merge branch 'wspp-schema' 2009-04-09 14:40:19 +10:00
Jelmer Vernooij
213249ceab Improve formatting in Python file. 2009-04-06 00:25:08 +02:00
Jelmer Vernooij
b1db78c595 Make valid_netbios_name() check a bit stricter. 2009-04-06 00:25:03 +02:00
Andrew Bartlett
354ba5e2e3 s4:schema Update Windows 2008 schema from Microsoft to latest version 2009-04-03 08:18:14 +11:00
Andrew Tridgell
631e688c82 Merge branch 'master' into wspp-schema 2009-03-31 11:58:37 +11:00
Matthias Dieter Wallnoefer
62ab39dde3 s4/provision: Use existing serverrole variable.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-03-21 03:07:00 +01:00
Andrew Bartlett
13be4d7ff4 s4:schema Remove 'cn' from the final output of ms_schema.py
This avoids one more point of difference between this an the output
from minschema and fullschema

Andrew Bartlett
2009-03-20 17:32:19 +11:00
Andrew Bartlett
37f130fd89 s4:fullschema Use server-side sort to make the output deterministic 2009-03-20 16:47:34 +11:00
Andrew Bartlett
f696bb81f8 s4: Remove autogenerated attributes from minschema and fullschema output
These attributes will be generated by Samba on import, and do not need
to be in the schema file.

Andrew Bartlett
2009-03-20 16:28:42 +11:00
Andrew Bartlett
653dd024a6 Add minschema like tool to extract and dump the full schema from AD 2009-03-20 16:28:41 +11:00
Andrew Bartlett
5bfed623f5 s4:minschma Fix aggregate schema generation in minschema
The conversion from EJS to python I did with Jelmer this morning was
not quite complete, due mostly to the difference between print in EJS
and python (python implies a newline).

Andrew Bartlett
2009-03-20 16:28:41 +11:00
Andrew Bartlett
6906c01cac s4:ldb Ensure to pass down options to LDB from python
This is needed for things such as to load modules, like the
paged_searches module.

Andrew Bartlett
2009-03-20 16:28:41 +11:00
Andrew Bartlett
27c6eca04c Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-20 13:22:08 +11:00
Jelmer Vernooij
5fe2b28f45 Merge branch 'master' of git://git.samba.org/samba into minschema 2009-03-20 01:30:36 +01:00
Jelmer Vernooij
ec9aeeab00 Fix up minschema after the conversion from JavaScript.
Pair programmed over the phone with Andrew :-)
2009-03-20 01:29:31 +01:00
Andrew Tridgell
483525f73c use a base64 encoded password when changing passwords
This avoids problems with embedded control characters in password
changes
2009-03-12 15:20:25 +11:00
Andrew Tridgell
0770028cbe fixed more embedded spaces in LDIF
This one added 3 spaces to the end of any new passwords
2009-03-12 15:13:23 +11:00
Andrew Tridgell
917905aea0 removed leading spaces from embedded ldif
This fixes the problem with the setpassword command failing like this:
   Error: First line of ldif must be a dn not '    dn'
2009-03-12 13:13:14 +11:00
Andrew Bartlett
5ffe7de348 s4:provision load_schema in provision.py no longer takes a hostname
This was missed in the earlier work to use this in provision-backend

Andrew Bartlett
2009-03-11 12:16:27 +11:00
Andrew Bartlett
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
Sreepathi Pai
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
Andrew Bartlett
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
Andrew Bartlett
41760c18bd Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-05 12:24:35 +11:00
Andrew Bartlett
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
Jelmer Vernooij
cdbc00bb52 Fix test_surrounding in samba4.rpcecho.python. 2009-03-02 05:07:30 +01:00
Jelmer Vernooij
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
Andrew Bartlett
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
Andrew Bartlett
8be9941354 Don't parse the schema data twice 2009-02-25 10:40:42 +11:00
Andrew Bartlett
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
Sreepathi Pai
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
Oliver Liebel
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
Oliver Liebel
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
Jelmer Vernooij
b9cf189404 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:02:26 +01:00
Jelmer Vernooij
dcb2e7d577 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:00:09 +01:00
Jelmer Vernooij
10c047c6f4 Fix finding of setup data. 2009-02-24 00:58:29 +01:00
Andrew Bartlett
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
Jelmer Vernooij
762fdc8c5c Provide a SamDB TestCase-class that can be used by OpenChange. 2009-02-12 16:00:11 +01:00
Jelmer Vernooij
7048e75aee Use created loadparm context, rather than the one specified on the command-line. 2009-02-12 15:58:11 +01:00
Jelmer Vernooij
be9a4157f0 Catch specific exceptions, rather than catching everything, which might hide other exceptions silently. 2009-02-11 19:04:33 +01:00
Jelmer Vernooij
9e71fef57b Use convenience function for finding setup dir in SaMDB tests. 2009-02-11 18:45:51 +01:00
Jelmer Vernooij
53b59aa2cf Use convenience function for finding setup_dir based on location of
python module.
2009-02-11 18:44:57 +01:00
Jelmer Vernooij
ddb4db7c65 Move some samdb-specific code out of provision. 2009-02-11 18:31:52 +01:00
Jelmer Vernooij
d9e94bf336 Make it possible to override the setup path. 2009-02-11 18:17:00 +01:00
Jelmer Vernooij
f13895851f Cancel transactions when exceptions are raised. 2009-02-11 17:54:58 +01:00
Stefan Metzmacher
9aa7698c0e s4:scripting/python: we should not silence warnings on handwritten python bindings
metze
2009-02-02 15:16:11 +01:00
Stefan Metzmacher
426dc44c5c s4:auth: the python bindings don't use swig anymore
metze
2009-02-02 15:16:09 +01:00
Jelmer Vernooij
ebb929779b Remove obsolete samr Python module - use samba.dcerpc.samr instead. 2009-01-22 15:23:32 +01:00
Stefan Metzmacher
7447151274 s4:python glue: fix dependecy to pyldb
metze
2009-01-21 13:35:34 +01:00
Jelmer Vernooij
b876478219 Make sure server_role gets initialized in backend provisioning code -
fixes test.
2009-01-19 21:14:37 +01:00
Andrew Bartlett
9fa6fb3d9f Print more useful suggestion for the main provision command line 2009-01-19 12:39:57 +11:00
Jelmer Vernooij
673ca5145c Find default smb.conf path correctly, when it was not specified on the
command-line.
2009-01-16 15:05:15 +01:00
Andrew Bartlett
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
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
c81de641cd Display lsa string contents. 2009-01-07 22:40:49 +01:00
Matthias Dieter Wallnöfer
05f97d3235 Fix typo 2009-01-06 16:23:29 +01:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Andrew Bartlett
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
Stefan Metzmacher
b719595fd6 pyglue: fix the build with automatic dependecies
metze
2008-12-29 08:42:03 +01:00
Jelmer Vernooij
00b61ff2cf samba.tests.samdb: Fix test after merger of samba.security and
samba.dcerpc.security
2008-12-23 11:44:10 +01:00
Jelmer Vernooij
8ce77a57cc pyldb: Fix segfault because of incorrect reference counting. 2008-12-23 05:36:27 +01:00
Jelmer Vernooij
d58270c537 Add header for pyparam. 2008-12-22 04:38:57 +01:00
Jelmer Vernooij
24b62772ab Remove includes of py_*.h, which are no longer generated. 2008-12-22 04:21:20 +01:00
Jelmer Vernooij
2227860a79 Fix more tests, improve repr() functions for various Python types. 2008-12-21 23:05:35 +01:00
Jelmer Vernooij
7e651c7ef3 Simplify customization of pidl-generated Python modules. 2008-12-21 21:10:40 +01:00
Jelmer Vernooij
a32194033a Move tests for ParamFile. 2008-12-21 16:39:17 +01:00
Jelmer Vernooij
676919872d Provide simple Python replacement for ParamFile, which currently exists
with a lot of overhead.
2008-12-21 15:55:23 +01:00
Jelmer Vernooij
6efb7ff981 Fix various Python-related bugs. 2008-12-21 07:34:27 +01:00
Jelmer Vernooij
eeb25cf548 Fix more introduced regressions in new bindings. 2008-12-21 04:36:16 +01:00
Jelmer Vernooij
bfb29e94b1 Convert auth python module to "plain" C rather than using SWIG. 2008-12-21 03:37:31 +01:00
Jelmer Vernooij
2e7a6cb6bf py: Fix initialisation of subtypes, fix segfaults. 2008-12-21 03:08:14 +01:00
Jelmer Vernooij
64419f47da Implement some of the stubs in misc python module. 2008-12-21 00:24:54 +01:00
Jelmer Vernooij
13fa639a29 Use plain C implementation for misc Python module rather than SWIG. 2008-12-20 23:38:30 +01:00
Jelmer Vernooij
0d585a67ed Support subtypes of ldb.Ldb. 2008-12-20 23:00:23 +01:00
Jelmer Vernooij
5076c64d43 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-12-19 21:47:45 +01:00
Jelmer Vernooij
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
Andrew Bartlett
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
Jelmer Vernooij
21702bfcde Cope with slight changes in tdb API. 2008-12-18 20:43:05 +00:00
Jelmer Vernooij
61a2d5c878 Use plain Python C API for registry module, rather than SWIG. 2008-12-18 16:49:33 +00:00
Andrew Bartlett
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