summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/dbchecker.py
Commit message (Collapse)AuthorAgeFilesLines
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-947/+0
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104
* dbckecker: fix nTSecurityDescriptor values from before 4.0.0rc6 (bug #9481)Stefan Metzmacher2013-01-271-2/+181
| | | | | | | | | They inherited effective ACE for the wrong object classes. For SACL ACEs the problem was also present in 4.0.0. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dbcheck: look in hasMasterNCs as well for determining the instance type of a NCMatthieu Patou2013-01-211-2/+10
| | | | | | Forest of level 2000 don't hve the msDS-hasMasterNCs parameter Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-dbcheck: Allow forcing an override of an old @MODULES recordAndrew Bartlett2013-01-101-0/+9
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-python: Various formatting fixes.Jelmer Vernooij2012-09-271-4/+4
| | | | | | * Trailing whitespace * use of "==" where "is" should be used * double spaces
* s4-dbcheck: Add lastKnownParent when moving an object to lostAndFoundAndrew Bartlett2012-07-281-7/+28
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Jul 28 05:40:43 CEST 2012 on sn-devel-104
* s4-dbcheck: Check for and correct incorrect instanceType valuesAndrew Bartlett2012-07-181-0/+45
|
* s4-dbcheck: Check for an object without a parentAndrew Bartlett2012-07-061-0/+44
| | | | | | | Such objects are then moved to the appropriate LostAndFound container, just as they would be if replicated. Andrew Bartlett
* s4-dbcheck: Always specify the dhcheck controlAndrew Bartlett2012-06-161-0/+1
| | | | | | This will then allow us to make schema modifications, overriding the default ban. Andrew Bartlett
* s4:dbchecker - handle the "none" case correctlyMatthias Dieter Wallnöfer2012-05-291-1/+1
| | | | | | | | | | This means that *no* fixing will be done, also the first possible one will be omitted as well. Reviewed-by: abartlet Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue May 29 21:36:25 CEST 2012 on sn-devel-104
* dbcheck: Add a check that every FSMO role has a valid ownerAndrew Bartlett2012-04-191-0/+41
| | | | | Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Apr 19 07:49:54 CEST 2012 on sn-devel-104
* dbcheck: added fix for incorrect RMD_FLAGSAndrew Tridgell2012-04-181-0/+35
| | | | | | | | | | this fixes the case where a DN link has RMD_FLAGS=0 for a link inside a deleted object Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Apr 18 09:19:41 CEST 2012 on sn-devel-104
* s4:dbchecker.py - integrate the "objectClass" fixing codeMatthias Dieter Wallnöfer2012-04-181-0/+27
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-python: Remove env from non-executable samba scripts.Andreas Schneider2012-03-131-2/+0
|
* s4-python: Various formatting fixes.Jelmer Vernooij2012-02-181-45/+14
|
* dbcheck: cope with objects disappearing during checkingAndrew Tridgell2011-12-081-5/+15
| | | | | Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Dec 8 03:23:49 CET 2011 on sn-devel-104
* samba-tool: allow dbcheck to correct the originating_change_time of the ↵Matthieu Patou2011-11-131-0/+34
| | | | | | | deleted object container Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sun Nov 13 15:47:53 CET 2011 on sn-devel-104
* samba-tool: dbcheck avoid problems with deleted objectsMatthieu Patou2011-11-131-1/+1
| | | | | | We have to search for deleted objects as well as the previous search might have been done with the show_deleted control. If not samba-tool fails with no such DN error while fetching the object.
* s4-dsdb: moved dsdb_Dn() into common.pyAndrew Tridgell2011-10-201-26/+3
| | | | | | this gives a method for dealing with binary DNs from python Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4:dbchecker: make use of local_oid controls for dsdb.DSDB_CONTROL_DBCHECKStefan Metzmacher2011-10-071-1/+1
| | | | metze
* samba-tool: add support for fixing broken backlinks in dbcheckAndrew Tridgell2011-10-061-20/+32
| | | | | | | | | this allows dangling backlinks to be removed Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Oct 6 07:08:35 CEST 2011 on sn-devel-104
* s4-dbchecker: fixed handling of DSDB DNs in dbcheckAndrew Tridgell2011-10-041-1/+1
| | | | | we need to use the original value, as ldb.Dn() can't parse a DSDB binary DN
* samba-tool: use show_recycled in dbcheckerAndrew Tridgell2011-09-221-13/+16
| | | | | we need to use show_recycled instead of show_deleted in dbchecker to allow us to see recycled objects
* pyldb: added OID_COMPARATOR constantsAndrew Tridgell2011-09-011-1/+1
| | | | | | | This also changes the other constants to remove the LDB_ prefix, which is redundent Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dbcheck: offer to fix dsServiceName to be in GUID formAndrew Tridgell2011-08-121-0/+43
| | | | | | this fixes the dsServiceName so it can handle server renames Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: use string DN in delete when fixing broken strings DNsAndrew Tridgell2011-07-211-1/+1
| | | | | | this prevents the extended_dn_in module from 'fixing' the DN for us Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: use samdb_schema for getting the backlinkAndrew Tridgell2011-07-131-1/+1
| | | | | | this is not available on an ldap samdb Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: only fix replPropertyMetaData if we included it in the searchAndrew Tridgell2011-07-131-11/+14
| | | | | | | if we didn't find a replPropertyMetaData attribute at all then don't try fixing it Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* dbcheck: added checks for missing and orphansed backlinksAndrew Tridgell2011-07-131-19/+18
| | | | | | | | this checks for missing backlinks or backlinks without a forward link and optionally fixes them Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: added --reindex optionAndrew Tridgell2011-07-131-0/+10
| | | | | | | this allows you to force a reindex of the database Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: added checking of backlinksAndrew Tridgell2011-07-131-54/+92
| | | | | Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* dbcheck: use get_lDAPDisplayName_by_attid()Andrew Tridgell2011-07-111-11/+3
| | | | | | | this is better than doing a schema search inside the dbcheck code Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104
* dbcheck: improved error checking in fixup of missing metdataAndrew Tridgell2011-07-111-26/+24
| | | | | | | | when fixing missing attributes in replPropertyMetaData, allow user to confirm changes, and check for exceptions Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4-samba-tool: dbcheck, check and fix broken metadataMatthieu Patou2011-07-111-0/+77
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* dbcheck: check all objects, including deleted objectsAndrew Tridgell2011-07-111-16/+17
| | | | | | | | | | this makes dbcheck search over all objects, deleted or not. This matters because when another DC replicates from this DC it replicates the deleted objects as well, so invalid attributes in deleted objects can cause problems on the new DC (for example, windows can get stuck or even crash during the replication) Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* dbcheck: added confirm_all support for remaining checksAndrew Tridgell2011-07-111-5/+10
| | | | | | | this allows the user to choose all/none for all the remaining database checks Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4-dbcheck: support the 'none' option for promptsAndrew Tridgell2011-07-051-2/+10
| | | | | | | Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Jul 5 08:22:40 CEST 2011 on sn-devel-104
* dbcheck: check for unknown attributes and offer to remove themAndrew Tridgell2011-07-051-3/+46
| | | | | | this asks the user if they want to remove an unknown attribute. You can also choose 'all' which will auto-confirm all questions about removing unknown attributes.
* s4-dbcheck: fix uninitialized errstr in err_dn_target_mismatchMatthieu Patou2011-06-221-2/+3
| | | | | Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Jun 22 21:22:27 CEST 2011 on sn-devel-104
* s4-dbcheck: remove unused includeMatthieu Patou2011-06-221-1/+1
|
* dbchecker: cope with a broken link to Deleted ObjectsAndrew Tridgell2011-06-221-2/+9
| | | | | if a DN link to Deleted Objects has a bad GUID, we need to use show_deleted
* dbchecker: when fixing a bad GUID in a DN, search by the string DNAndrew Tridgell2011-06-221-1/+1
|
* samba-tool: added --attrs option to dbcheckAndrew Tridgell2011-06-221-6/+7
| | | | this allows checking of a specific list of attributes
* samba-tool: make the dbcheck class available outside of samba-toolAndrew Tridgell2011-06-221-0/+308
this will be used in provision, and probably in upgradeprovision as well