summaryrefslogtreecommitdiff
path: root/python/samba/netcmd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-02-11 14:49:01 +1100
committerStefan Metzmacher <metze@samba.org>2013-03-25 10:53:47 +0100
commit810f8b48d925ea15f3439c4b228741d8fddaccd8 (patch)
treeeab529b0bc9f20ee218fc4e726eb0eaf8a50f4cb /python/samba/netcmd
parent9040e2684161ce75738e9da0fee191aa34858607 (diff)
downloadsamba-810f8b48d925ea15f3439c4b228741d8fddaccd8.tar.gz
samba-810f8b48d925ea15f3439c4b228741d8fddaccd8.tar.bz2
samba-810f8b48d925ea15f3439c4b228741d8fddaccd8.zip
samba-tool dbcheck: Add --reset-well-known-acls
This will allow an upgrade from Samba 4.0.0 without needing to run samba_upgradeprovision, which for now is not the preferred upgrade tool. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'python/samba/netcmd')
-rw-r--r--python/samba/netcmd/dbcheck.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/samba/netcmd/dbcheck.py b/python/samba/netcmd/dbcheck.py
index 889b0ff075..4cc0631bf7 100644
--- a/python/samba/netcmd/dbcheck.py
+++ b/python/samba/netcmd/dbcheck.py
@@ -56,6 +56,7 @@ class cmd_dbcheck(Command):
Option("--attrs", dest="attrs", default=None, help="list of attributes to check (space separated)"),
Option("--reindex", dest="reindex", default=False, action="store_true", help="force database re-index"),
Option("--force-modules", dest="force_modules", default=False, action="store_true", help="force loading of Samba modules and ignore the @MODULES record (for very old databases)"),
+ Option("--reset-well-known-acls", dest="reset_well_known_acls", default=False, action="store_true", help="reset ACLs on objects with well known default ACL values to the default"),
Option("-H", "--URL", help="LDB URL for database or target server (defaults to local SAM database)",
type=str, metavar="URL", dest="H"),
]
@@ -63,7 +64,8 @@ class cmd_dbcheck(Command):
def run(self, DN=None, H=None, verbose=False, fix=False, yes=False,
cross_ncs=False, quiet=False,
scope="SUB", credopts=None, sambaopts=None, versionopts=None,
- attrs=None, reindex=False, force_modules=False):
+ attrs=None, reindex=False, force_modules=False,
+ reset_well_known_acls=False):
lp = sambaopts.get_loadparm()
@@ -114,7 +116,8 @@ class cmd_dbcheck(Command):
started_transaction = True
try:
chk = dbcheck(samdb, samdb_schema=samdb_schema, verbose=verbose,
- fix=fix, yes=yes, quiet=quiet, in_transaction=started_transaction)
+ fix=fix, yes=yes, quiet=quiet, in_transaction=started_transaction,
+ reset_well_known_acls=reset_well_known_acls)
if reindex:
self.outf.write("Re-indexing...\n")