s4/scripting: Py2/Py3 for samba4.blackbox.upgradeprovision.alpha13
authorNoel Power <noel.power@suse.com>
Mon, 27 Aug 2018 19:29:53 +0000 (20:29 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Oct 2018 03:50:27 +0000 (05:50 +0200)
fixup source4/scripting/bin/samba_upgradedns
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_upgradedns

index e29ba7092b57bc5a49684dba9bb4716e65bf9d34..6eb7f823a50b68039dbb53e2c9fd75096e9bfb9c 100755 (executable)
@@ -401,16 +401,17 @@ if __name__ == '__main__':
         ncs = msg.get("msDS-hasMasterNCs")
         if ncs:
             for nc in ncs:
-                master_nclist.append(nc)
+                master_nclist.append(str(nc))
 
         partial_nclist = []
         ncs = msg.get("hasPartialReplicaNCs")
         if ncs:
             for nc in ncs:
-                partial_nclist.append(nc)
+                partial_nclist.append(str(nc))
 
         modified_master = False
         modified_partial = False
+
         for nc in dns_nclist:
             if nc not in master_nclist:
                 master_nclist.append(nc)
@@ -519,7 +520,7 @@ if __name__ == '__main__':
                         logger.info("Failed to chown %s to bind gid %u",
                                     paths.binddns_dir, paths.bind_gid)
                 try:
-                    os.chmod(bind_dns_keytab_path, 0640)
+                    os.chmod(bind_dns_keytab_path, 0o640)
                     os.chown(bind_dns_keytab_path, -1, paths.bind_gid)
                 except OSError:
                     if not os.environ.has_key('SAMBA_SELFTEST'):