diff -up authconfig-6.2.10/authinfo.py.byteconv authconfig-6.2.10/authinfo.py --- authconfig-6.2.10/authinfo.py.byteconv 2015-05-11 16:50:15.608497236 +0200 +++ authconfig-6.2.10/authinfo.py 2015-05-11 16:51:56.303867029 +0200 @@ -904,9 +904,9 @@ def feedFork(command, echo, query, respo if not pid: # child if query: - child = Popen([command], shell=True) + child = Popen([command], shell=True, universal_newlines=True) else: - child = Popen([command], stdin=PIPE, shell=True) + child = Popen([command], stdin=PIPE, shell=True, universal_newlines=True) child.communicate(input=(response or '')+'\n') # wait for the child to terminate & set the returncode @@ -1005,8 +1005,8 @@ def isEmptyDir(path): def callPKCS11Setup(options): try: - child = Popen([PATH_SCSETUP] + options, stdout=PIPE) - lst = child.communicate()[0].split(b"\n") + child = Popen([PATH_SCSETUP] + options, stdout=PIPE, universal_newlines=True) + lst = child.communicate()[0].split("\n") if child.returncode != 0: return None if lst[-1] == '': @@ -1940,7 +1940,7 @@ class AuthInfo: if rmactions == None: return False for action in rmactions: - if b"lockhelper.sh" in action: + if "lockhelper.sh" in action: lock = True if lock: self.setParam("smartcardAction", _("Lock"), ref) @@ -4310,11 +4310,12 @@ class AuthInfo: if echo: sys.stderr.write("[%s]\n" % cmd) - child = Popen([cmd], shell=True) + if self.joinPassword or not echo: + status, error = feedFork(cmd, echo, "sword:", self.joinPassword) + else: + child = Popen([cmd], shell=True, universal_newlines=True) child.communicate() status = child.returncode - else: - status, error = feedFork(cmd, echo, "sword:", self.joinPassword) if echo: if status != 0: self.messageCB(_("Winbind domain join was not successful.")) @@ -4347,7 +4348,7 @@ class AuthInfo: if echo: sys.stderr.write("[%s]\n" % cmd) - child = Popen([cmd], shell=True) + child = Popen([cmd], shell=True, universal_newlines=True) child.communicate() status = child.returncode else: @@ -4366,7 +4367,7 @@ class AuthInfo: return status == 0 def uninstallIPA(self): - cmd = PATH_IPA_CLIENT_INSTALL + " --uninstall --noac" + cmd = PATH_IPA_CLIENT_INSTALL + " --uninstall --noac --unattended" os.system(cmd) def toggleCachingService(self, nostart): @@ -4486,7 +4487,7 @@ class AuthInfo: try: readf = request.urlopen(self.ldapCacertURL) writef = openLocked(self.ldapCacertDir + "/" + LDAP_CACERT_DOWNLOADED, 0o644) - writef.write(readf.read()) + writef.write(readf.read().decode()) readf.close() writef.close() except (IOError, OSError, ValueError):