downgradedatabase: comply with samba.tests.source
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Mon, 22 Jul 2019 03:29:03 +0000 (15:29 +1200)
committerGarming Sam <garming@samba.org>
Tue, 20 Aug 2019 03:40:28 +0000 (03:40 +0000)
In next commit we'll install the script, samba.tests.source picked up the
lack of a copyright message and some whitespace errors, so this patch
fixes that stuff first.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/scripting/bin/sambadowngradedatabase

index 9d1e2b8cc76eb7451997251b5fd352cadf986056..87a989bfd6a2e0304eb1a4cf4d80939ab2f0d0b1 100755 (executable)
@@ -1,4 +1,24 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
+#
+# Unix SMB/CIFS implementation.
+# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2019
+#
+# Downgrade a database from 4.11 format to 4.7 format. 4.7 Format will
+# run on any version of Samba AD, and Samba will repack/reconfigure the
+# database if necessary.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 from __future__ import print_function
 import optparse
 import sys
@@ -38,9 +58,9 @@ samdb = ldb.Ldb(url=url,
                 options=["modules:"])
 
 partitions = samdb.search(base="@PARTITION",
-                         scope=ldb.SCOPE_BASE,
+                          scope=ldb.SCOPE_BASE,
                           attrs=["backendStore", "partition"])
-    
+
 backend = str(partitions[0].get('backendStore', 'tdb'))
 
 if backend == "mdb":