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

62 Commits

Author SHA1 Message Date
Andrew Tridgell
390f7b535d py-samdb: added server_site_name method 2010-02-26 13:59:17 +11:00
Andrew Tridgell
8f763e046c py-samdb: added get_invocation_id() method 2010-02-26 13:59:17 +11:00
Andrew Tridgell
fcfb5d7b63 s4-provision: allow provision modifies to add records
we need to recognise a changetype of 'add'
2010-01-08 13:02:59 +11:00
Jelmer Vernooij
66f81d18ce samba: Fix whitespace, remove pointless 'pass' statement.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:31 +11:00
Jelmer Vernooij
ea5af6e30c pyldb: Add dom_sid.split in favor of less powerful dom_sid_to_rid().
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:30 +11:00
Nadezhda Ivanova
a760f169f4 Some changes to allow processing of ldap controls on modify requests.
ldap_backend used to filter out ldap controls on modify. Also, modified
python binding for ldap_modify to allow writing tests for such controls.
2009-11-20 13:22:38 +02:00
Matthias Dieter Wallnöfer
992d35d38a s4:samdb python bindings - make the python wrap connect more like the C one
Add call for setting the create permissions.
2009-11-05 11:56:22 +01:00
Andrew Bartlett
6439bdeb3a s4:provision Split ProvisionBackend out of the main provision script
This splits the code, while keeping the original behaviour.  The
provision.py file had become just too long.

Andrew Bartlett
2009-11-02 16:36:56 +11:00
Andrew Bartlett
4be253fe2f s4:provision Move 'Schema' into it's own file 2009-11-02 16:36:55 +11:00
Matthieu Patou
8bf517d340 s4: Improve provisioning: use relax control
Give the possibility to specify controls when loading ldif files.
  Relax control is specified by default for all ldb_add_diff (request Andrew B).
  Set domainguid if specified at the creation of object instead of modifying afterward
  Allow to specify objectGUID for NTDS object of the first DC this option is used during provision upgrade.
2009-10-02 12:45:01 +02:00
Matthias Dieter Wallnöfer
bfb3eaabe7 s4/python: flags
- Introduce the "userAccountControl", "groupType" and "sAMAccountType" flags
- Corrects the "domain/forestFunctionality" and "domainControllerFunctionality" flags
2009-09-17 12:40:27 +02:00
Matthias Dieter Wallnöfer
353481daa2 s4:provision - Add a new delete function only for users and computers
We need this new function to delete users and computers before other objects
on reprovisioning. Otherwise primary groups could be deleted before user/computer
accounts (which isn't allowed anymore by the reworked "samldb" module).
2009-09-07 08:37:23 +02:00
Andrew Bartlett
160c197b84 s4:python Add helper to get at the domain SID 2009-08-27 19:40:21 +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
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
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
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
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
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
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
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 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
Jelmer Vernooij
6ace18904d Fix more unresolved symbols. 2009-06-02 18:05:41 +02:00
Jelmer Vernooij
b1db78c595 Make valid_netbios_name() check a bit stricter. 2009-04-06 00:25:03 +02: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
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
2e7a6cb6bf py: Fix initialisation of subtypes, fix segfaults. 2008-12-21 03:08:14 +01:00
Jelmer Vernooij
73b789b6d2 Add docstrings to a couple more python modules.
(This used to be commit b4560c90e5)
2008-05-24 04:01:57 +02:00
Jelmer Vernooij
166105b0b6 Fix bug after reprocessing swig files with newer version of SWIG.
(This used to be commit 2155d76646)
2008-05-23 03:20:37 +02:00
Jelmer Vernooij
c401aa9357 Use restructuredText formatting for docstrings.
(This used to be commit 0cc58decd7)
2008-05-23 00:37:22 +02:00
Jelmer Vernooij
6e14d44d27 Make sure the default ldb modules dir gets initialized.
(This used to be commit 937456c69d)
2008-05-22 01:50:38 +02:00
Andrew Kroeger
b2c6ba69a4 provision: Increase max NetBIOS name length from 13 to 15.
Issue originally reported by user Julsa-FR on IRC.
(This used to be commit ee9ad77009)
2008-03-27 16:30:18 -05:00
Andrew Bartlett
8b24d248b7 Start to rework provision for LDAP backends
This is the start of the rework of the provision script to handle an
LDAP backend correctly.  For example, we must not set the 'tdb
modules' against an LDAP backend such as OpenLDAP that handles subtree
renames.

Andrew Bartlett
(This used to be commit e462a107d3)
2008-03-07 07:33:14 +11:00
Andrew Bartlett
4d4a898742 Fix failure to re-provision.
Somewhere in the conversion from ejs we lost calling the 'delete
partitions' code.  However, we have to be careful not to wipe
partitions when we are the second client connecting to an LDAP server.

Andrew Bartlett
(This used to be commit 272eb765b8)
2008-03-03 13:03:19 +11:00
Jelmer Vernooij
dcb04065cd python: Fix representation of UUIDs as strings in zone files rather than binary blobs, fix escaping of LDAP URL's in PHP LDAP admin configuration.
Pair-programmed with Andrew, but git doesn't appear to support multiple --author arguments. :-(
(This used to be commit dff54ff043)
2008-01-25 03:54:33 +01:00
Jelmer Vernooij
37f35d2a03 python/provision: Reconcile code partitions-only provisioning and generic provisioning, some other minor refactoring of the provisioning.
Pair-programmed by Andrew and me using obby :-)
(This used to be commit 688adcbb63)
2008-01-25 01:02:13 +01:00
Jelmer Vernooij
d958f4b391 python: Add function to look for unsubsituted variables.
(This used to be commit e726ce5bc5)
2008-01-24 22:18:27 +01:00
Jelmer Vernooij
378dff1365 python: Fix typo.
(This used to be commit d6b06fc03e)
2008-01-11 16:28:17 +01:00
Jelmer Vernooij
7c3e8c838f Python: Simplify code in a couple of places. Copy Andrew's changes from g53b5166.
(This used to be commit f056f62495)
2008-01-11 16:13:46 +01:00
Jelmer Vernooij
5e03b92182 r26642: samba3sam.py: Remove more EJS-specific code.
(This used to be commit 7d14b657b3)
2008-01-01 19:57:02 -06:00
Jelmer Vernooij
6817c5d885 r26628: python: Add more documentation, simplify code in Samba3 module.
(This used to be commit 3c329ee73d)
2007-12-29 12:21:04 -06:00
Jelmer Vernooij
533cc583ed r26596: Fixed upgrade.py.
Added blackbox tests for provision and upgrade Python scripts.
Clean up temporary files created by the Python tests.
(This used to be commit 2227fb6df6)
2007-12-26 11:57:08 -06:00
Jelmer Vernooij
aa0a06f13c r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s.
- Start working on Python equivalents for various EJS tests.
- Fix regression in argument order for reg_diff_apply() in EJS bindings.
(This used to be commit c550c03372)
2007-12-24 01:51:03 -06:00
Jelmer Vernooij
109a903750 r26545: Sync output with ejs.
(This used to be commit 48ceaa9643)
2007-12-21 06:28:46 +01:00
Jelmer Vernooij
c2fffa8335 r26538: Pass path generation function around rather than base directory.
(This used to be commit 5f921af41e)
2007-12-21 05:51:59 +01:00
Jelmer Vernooij
86f91db7d5 r26536: More tests for provisioning code.
(This used to be commit 43c8bfeedf)
2007-12-21 05:51:56 +01:00
Jelmer Vernooij
4e6ab64762 r26527: Start on tests for provision.
(This used to be commit 84ac6c6bbf)
2007-12-21 05:51:50 +01:00