1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

49 Commits

Author SHA1 Message Date
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 b4560c90e5e8d3a35367d3a21d361dc4c9c0de23)
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 2155d76646f4235c8857460f562a9cc4cafe3ab1)
2008-05-23 03:20:37 +02:00
Jelmer Vernooij
c401aa9357 Use restructuredText formatting for docstrings.
(This used to be commit 0cc58decd74d20f3d7dff93ddef1c8bce4d49ad0)
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 937456c69d23ece85bdb7415f52d722c2aa6b6b5)
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 ee9ad77009ef5e36655a49c41730a4a963ba9d43)
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 e462a107d3bafcc546ca4d53dcc8eb32e4280745)
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 272eb765b81e3eab216a07249334f9b7d20e530b)
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 dff54ff043563f93b86361039c46e662045f62cc)
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 688adcbb635af87fcfedb869b7f1857a947fd2f9)
2008-01-25 01:02:13 +01:00
Jelmer Vernooij
d958f4b391 python: Add function to look for unsubsituted variables.
(This used to be commit e726ce5bc515ae8d10b472396e228cfd35737476)
2008-01-24 22:18:27 +01:00
Jelmer Vernooij
378dff1365 python: Fix typo.
(This used to be commit d6b06fc03e37781f5f59b15cff8fe3ee8df63444)
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 f056f624958af79204c972eba3f85e36e93daed7)
2008-01-11 16:13:46 +01:00
Jelmer Vernooij
5e03b92182 r26642: samba3sam.py: Remove more EJS-specific code.
(This used to be commit 7d14b657b3d59924b15f4f84bbd5745cd7f759ef)
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 3c329ee73d9979236313c37e51750ec06b8dd69e)
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 2227fb6df62240cae64d27a1920d878316f819fc)
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 c550c03372cb260b78f6a6c132e70571bc4cb852)
2007-12-24 01:51:03 -06:00
Jelmer Vernooij
109a903750 r26545: Sync output with ejs.
(This used to be commit 48ceaa964327ed7094275780cc3c0767636bcb18)
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 5f921af41e4dcd6844f6a662d56bd27c4e76ff88)
2007-12-21 05:51:59 +01:00
Jelmer Vernooij
86f91db7d5 r26536: More tests for provisioning code.
(This used to be commit 43c8bfeedf06ce806c524a28fa72c643f6db60f4)
2007-12-21 05:51:56 +01:00
Jelmer Vernooij
4e6ab64762 r26527: Start on tests for provision.
(This used to be commit 84ac6c6bbfc4baaf28906ee5826a9cf888043656)
2007-12-21 05:51:50 +01:00
Jelmer Vernooij
1c29a63d44 r26523: Refactor provisioning code.
(This used to be commit ac1083178f9e521dcd5d3d8b5199abcb00159adf)
2007-12-21 05:51:44 +01:00
Jelmer Vernooij
54a48d40a1 r26522: Fix warnings on SamDB connect from Python, simplify the setup code for the various LDBs.
(This used to be commit 20c686f501b652ec0578a075a124b72ecb5f41b6)
2007-12-21 05:51:42 +01:00
Jelmer Vernooij
2fef113e82 r26521: Fix newlines.
(This used to be commit 174aa1583791a4c305bc49cf78f8f10d42701bc9)
2007-12-21 05:51:40 +01:00
Jelmer Vernooij
63f53094ef r26520: More Python updates.
(This used to be commit a8b1fe15ac853082961132ede061fe1556ae29f7)
2007-12-21 05:51:31 +01:00
Jelmer Vernooij
ca74c6e6c4 r26513: Update substitution dictionary for ldifs.
(This used to be commit 60fb2de2119cb2f42f858868e39c3b0d303ac20f)
2007-12-21 05:51:18 +01:00
Jelmer Vernooij
32f439bfa4 r26503: Change order of arguments in param interface so it's easier to make the
section name optional. Fix several smaller bits and pieces in the Python code.
(This used to be commit 1b89311e5fa4fcde060df50e580dc221205cc8ca)
2007-12-21 05:51:06 +01:00
Jelmer Vernooij
b0360e3a86 r26496: Move some provision functions to a new SamDB class, support setting session_info on a ldb context from python.
(This used to be commit 75cfb0d609687538048a7d72a499a5205af46a34)
2007-12-21 05:50:50 +01:00
Jelmer Vernooij
440fd87961 r26477: Allow setting loadparm context for a ldb context in python, plus some other minor improvements.
(This used to be commit d88527a9d6435203faa8273347d5aa41937e5395)
2007-12-21 05:50:36 +01:00
Jelmer Vernooij
0a01f50f98 r26475: Add ldb.set_credentials function.
(This used to be commit dbebb4ef477d2c8de7b8d1e5cde9b9dada47044f)
2007-12-21 05:50:35 +01:00
Jelmer Vernooij
1afe054916 r26474: Move credentials-specific kerberos file to credentials subsystem. Fixes missing symbols in some of the python bindings.
(This used to be commit e26d0fff6d40899113196ac35a86a9baa10cc9c2)
2007-12-21 05:50:34 +01:00
Jelmer Vernooij
eba25f5d18 r26375: Move provision-independent utility function to main samba python module.
(This used to be commit 9d0ff47be069422de7ef2794357c6f3e9c540e67)
2007-12-21 05:49:10 +01:00
Jelmer Vernooij
39adc2418a r26088: Import some native-python python modules and move original python swig torture code to common python directory as well.
(This used to be commit cbf656ff054ab2b0b5ca81e1d4f16ac54c8098f1)
2007-12-21 05:45:59 +01:00