summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/__init__.py
AgeCommit message (Collapse)AuthorFilesLines
2009-08-27s4:python Add helper to get at the domain SIDAndrew Bartlett1-0/+6
2009-08-26s4:provison Add prefixes to ldb using same code a later modify will useAndrew Bartlett1-0/+3
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-25s4:python Fix the reprovision test by deleting 'deleted' objects too.Andrew Bartlett1-6/+9
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-17fixed the buildAndrew Tridgell1-3/+5
the changes from Matthias didn't take account of url and lp being None in some ldb python instances in 'make test'
2009-08-17s4: Major rework of the LDB/SAMDB/IDMAP python bindingsMatthias Dieter Wallnöfer1-12/+23
- 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-17s4:provision Avoid one more call to ltdb_reindexAndrew Bartlett1-3/+16
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-17s4:python Allow 'no such object' on the delete of the DNAndrew Bartlett1-1/+5
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-17s4:python Push some helper functions from SamDB into samba.LdbAndrew Bartlett1-33/+57
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-14s4: Better way to call "dom_sid_to_rid" from ldap.pyMatthias Dieter Wallnöfer1-0/+10
2009-07-19Remove unnecessary imports.Jelmer Vernooij1-1/+0
2009-07-18python: Set right ldb modules directory when using system ldb.Jelmer Vernooij1-0/+2
2009-07-16s4:dsdb Handle dc/domain/forest functional levels properlyAndrew Bartlett1-0/+5
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-02Changed ldb.ERR_NO_SUCH_OBJECT to LDB_ERR_NO_SUCH_OBJECT.Andrew Tridgell1-5/+5
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-06-02Fix more unresolved symbols.Jelmer Vernooij1-1/+1
2009-04-06Make valid_netbios_name() check a bit stricter.Jelmer Vernooij1-2/+4
2009-03-20s4:ldb Ensure to pass down options to LDB from pythonAndrew Bartlett1-3/+3
This is needed for things such as to load modules, like the paged_searches module. Andrew Bartlett
2009-02-24expand tabs in python file, consistent with the rest of the file.Jelmer Vernooij1-1/+1
2008-12-21py: Fix initialisation of subtypes, fix segfaults.Jelmer Vernooij1-6/+10
2008-05-24Add docstrings to a couple more python modules.Jelmer Vernooij1-0/+2
(This used to be commit b4560c90e5e8d3a35367d3a21d361dc4c9c0de23)
2008-05-23Fix bug after reprocessing swig files with newer version of SWIG.Jelmer Vernooij1-3/+3
(This used to be commit 2155d76646f4235c8857460f562a9cc4cafe3ab1)
2008-05-23Use restructuredText formatting for docstrings.Jelmer Vernooij1-0/+2
(This used to be commit 0cc58decd74d20f3d7dff93ddef1c8bce4d49ad0)
2008-05-22Make sure the default ldb modules dir gets initialized.Jelmer Vernooij1-0/+2
(This used to be commit 937456c69d23ece85bdb7415f52d722c2aa6b6b5)
2008-03-27provision: Increase max NetBIOS name length from 13 to 15.Andrew Kroeger1-1/+1
Issue originally reported by user Julsa-FR on IRC. (This used to be commit ee9ad77009ef5e36655a49c41730a4a963ba9d43)
2008-03-07Start to rework provision for LDAP backendsAndrew Bartlett1-1/+6
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-03Fix failure to re-provision.Andrew Bartlett1-2/+9
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-01-25python: Fix representation of UUIDs as strings in zone files rather than ↵Jelmer Vernooij1-2/+2
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-25python/provision: Reconcile code partitions-only provisioning and generic ↵Jelmer Vernooij1-2/+4
provisioning, some other minor refactoring of the provisioning. Pair-programmed by Andrew and me using obby :-) (This used to be commit 688adcbb635af87fcfedb869b7f1857a947fd2f9)
2008-01-24python: Add function to look for unsubsituted variables.Jelmer Vernooij1-0/+15
(This used to be commit e726ce5bc515ae8d10b472396e228cfd35737476)
2008-01-11python: Fix typo.Jelmer Vernooij1-2/+2
(This used to be commit d6b06fc03e37781f5f59b15cff8fe3ee8df63444)
2008-01-11Python: Simplify code in a couple of places. Copy Andrew's changes from ↵Jelmer Vernooij1-6/+6
g53b5166. (This used to be commit f056f624958af79204c972eba3f85e36e93daed7)
2008-01-01r26642: samba3sam.py: Remove more EJS-specific code.Jelmer Vernooij1-2/+1
(This used to be commit 7d14b657b3d59924b15f4f84bbd5745cd7f759ef)
2007-12-29r26628: python: Add more documentation, simplify code in Samba3 module.Jelmer Vernooij1-0/+8
(This used to be commit 3c329ee73d9979236313c37e51750ec06b8dd69e)
2007-12-26r26596: Fixed upgrade.py.Jelmer Vernooij1-3/+3
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-24r26570: - Trim size of the swig-generated Python bindings by removing a ↵Jelmer Vernooij1-4/+16
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-21r26545: Sync output with ejs.Jelmer Vernooij1-0/+2
(This used to be commit 48ceaa964327ed7094275780cc3c0767636bcb18)
2007-12-21r26538: Pass path generation function around rather than base directory.Jelmer Vernooij1-2/+39
(This used to be commit 5f921af41e4dcd6844f6a662d56bd27c4e76ff88)
2007-12-21r26536: More tests for provisioning code.Jelmer Vernooij1-1/+3
(This used to be commit 43c8bfeedf06ce806c524a28fa72c643f6db60f4)
2007-12-21r26527: Start on tests for provision.Jelmer Vernooij1-2/+0
(This used to be commit 84ac6c6bbfc4baaf28906ee5826a9cf888043656)
2007-12-21r26523: Refactor provisioning code.Jelmer Vernooij1-3/+5
(This used to be commit ac1083178f9e521dcd5d3d8b5199abcb00159adf)
2007-12-21r26522: Fix warnings on SamDB connect from Python, simplify the setup code ↵Jelmer Vernooij1-3/+4
for the various LDBs. (This used to be commit 20c686f501b652ec0578a075a124b72ecb5f41b6)
2007-12-21r26521: Fix newlines.Jelmer Vernooij1-1/+1
(This used to be commit 174aa1583791a4c305bc49cf78f8f10d42701bc9)
2007-12-21r26520: More Python updates.Jelmer Vernooij1-0/+4
(This used to be commit a8b1fe15ac853082961132ede061fe1556ae29f7)
2007-12-21r26513: Update substitution dictionary for ldifs.Jelmer Vernooij1-0/+3
(This used to be commit 60fb2de2119cb2f42f858868e39c3b0d303ac20f)
2007-12-21r26503: Change order of arguments in param interface so it's easier to make theJelmer Vernooij1-27/+29
section name optional. Fix several smaller bits and pieces in the Python code. (This used to be commit 1b89311e5fa4fcde060df50e580dc221205cc8ca)
2007-12-21r26496: Move some provision functions to a new SamDB class, support setting ↵Jelmer Vernooij1-33/+71
session_info on a ldb context from python. (This used to be commit 75cfb0d609687538048a7d72a499a5205af46a34)
2007-12-21r26477: Allow setting loadparm context for a ldb context in python, plus ↵Jelmer Vernooij1-7/+24
some other minor improvements. (This used to be commit d88527a9d6435203faa8273347d5aa41937e5395)
2007-12-21r26475: Add ldb.set_credentials function.Jelmer Vernooij1-2/+5
(This used to be commit dbebb4ef477d2c8de7b8d1e5cde9b9dada47044f)
2007-12-21r26474: Move credentials-specific kerberos file to credentials subsystem. ↵Jelmer Vernooij1-0/+9
Fixes missing symbols in some of the python bindings. (This used to be commit e26d0fff6d40899113196ac35a86a9baa10cc9c2)
2007-12-21r26375: Move provision-independent utility function to main samba python module.Jelmer Vernooij1-0/+9
(This used to be commit 9d0ff47be069422de7ef2794357c6f3e9c540e67)
2007-12-21r26088: Import some native-python python modules and move original python ↵Jelmer Vernooij1-0/+57
swig torture code to common python directory as well. (This used to be commit cbf656ff054ab2b0b5ca81e1d4f16ac54c8098f1)