tmraz pushed to authconfig (master). "fix regression from the python 3 compat patch"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Apr 1 17:07:35 UTC 2015
>From 32d67a8d1d9d14ece6f49b3c12ac78eecae1b15a Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tmraz at fedoraproject.org>
Date: Wed, 1 Apr 2015 19:07:24 +0200
Subject: fix regression from the python 3 compat patch
diff --git a/authconfig-6.2.10-cacertdir.patch b/authconfig-6.2.10-cacertdir.patch
index b109ed1..86de3ee 100644
--- a/authconfig-6.2.10-cacertdir.patch
+++ b/authconfig-6.2.10-cacertdir.patch
@@ -1,6 +1,6 @@
diff -up authconfig-6.2.10/authinfo.py.cacertdir authconfig-6.2.10/authinfo.py
--- authconfig-6.2.10/authinfo.py.cacertdir 2015-03-31 10:40:43.321241910 +0200
-+++ authconfig-6.2.10/authinfo.py 2015-03-31 10:52:44.420811832 +0200
++++ authconfig-6.2.10/authinfo.py 2015-04-01 19:05:27.879900326 +0200
@@ -116,7 +116,7 @@ PATH_LIBSSS_AUTOFS = "/usr" + LIBDIR + "
PATH_WINBIND_NET = "/usr/bin/net"
PATH_IPA_CLIENT_INSTALL = "/usr/sbin/ipa-client-install"
@@ -24,7 +24,36 @@ diff -up authconfig-6.2.10/authinfo.py.cacertdir authconfig-6.2.10/authinfo.py
def matchKeyEquals(line, key):
if line.startswith(key):
# Skip intervening whitespace.
-@@ -1627,7 +1634,6 @@ class AuthInfo:
+@@ -926,9 +933,9 @@ def feedFork(command, echo, query, respo
+ try:
+ c = os.read(master, 1)
+ except OSError as err:
+- if err == errno.EINTR or err == errno.EAGAIN:
++ if err.errno == errno.EINTR or err.errno == errno.EAGAIN:
+ pass
+- elif err == errno.EIO:
++ elif err.errno == errno.EIO:
+ os.close(master)
+ eof = True
+ else:
+@@ -1222,14 +1229,13 @@ class CacheBackup(FileBackup):
+ return rv
+
+ # indexes for the configs
+-(CFG_HESIOD, CFG_YP, CFG_LDAP, CFG_NSSLDAP, CFG_PAMLDAP, CFG_NSLCD, CFG_OPENLDAP, CFG_KRB5,
++(CFG_HESIOD, CFG_YP, CFG_NSSLDAP, CFG_PAMLDAP, CFG_NSLCD, CFG_OPENLDAP, CFG_KRB5,
+ CFG_KRB, CFG_PAM_PKCS11, CFG_SMB, CFG_NSSWITCH, CFG_CACHE,
+ CFG_PAM, CFG_POSTLOGIN_PAM, CFG_PASSWORD_PAM, CFG_FINGERPRINT_PAM, CFG_SMARTCARD_PAM, CFG_AUTHCONFIG, CFG_NETWORK, CFG_LIBUSER, CFG_PWQUALITY,
+- CFG_LOGIN_DEFS, CFG_SSSD, CFG_SHADOW, CFG_PASSWD, CFG_GSHADOW, CFG_GROUP, CFG_DCONF, CFG_DCONF_LOCKS) = list(range(0, 30))
++ CFG_LOGIN_DEFS, CFG_SSSD, CFG_SHADOW, CFG_PASSWD, CFG_GSHADOW, CFG_GROUP, CFG_DCONF, CFG_DCONF_LOCKS) = list(range(0, 29))
+ all_configs = [
+ FileBackup("hesiod.conf", SYSCONFDIR+"/hesiod.conf"),
+ FileBackup("yp.conf", SYSCONFDIR+"/yp.conf"),
+- FileBackup("ldap.conf", SYSCONFDIR+"/ldap.conf"),
+ FileBackup("nss_ldap.conf", SYSCONFDIR+"/nss_ldap.conf"),
+ FileBackup("pam_ldap.conf", SYSCONFDIR+"/pam_ldap.conf"),
+ FileBackup("nslcd.conf", SYSCONFDIR+"/nslcd.conf"),
+@@ -1627,7 +1633,6 @@ class AuthInfo:
# Read LDAP setup from /etc/ldap.conf.
def readLDAP(self, ref):
@@ -32,9 +61,12 @@ diff -up authconfig-6.2.10/authinfo.py.cacertdir authconfig-6.2.10/authinfo.py
# Open the file. Bail if it's not there or there's some problem
# reading it.
try:
-@@ -1642,43 +1648,50 @@ class AuthInfo:
+@@ -1640,45 +1645,52 @@ class AuthInfo:
+ f = open(all_configs[CFG_PAMLDAP].origPath, "r")
+ except IOError:
try:
- f = open(all_configs[CFG_LDAP].origPath, "r")
+- f = open(all_configs[CFG_LDAP].origPath, "r")
++ f = open(all_configs[CFG_OPENLDAP].origPath, "r")
except IOError:
+ self.ldapCacertDir = PATH_LDAP_CACERTS
return False
@@ -88,7 +120,18 @@ diff -up authconfig-6.2.10/authinfo.py.cacertdir authconfig-6.2.10/authinfo.py
f.close()
return True
-@@ -4443,7 +4456,7 @@ class AuthInfo:
+@@ -2747,10 +2759,6 @@ class AuthInfo:
+ return True
+
+ def writeLDAP(self):
+- if os.path.isfile(all_configs[CFG_LDAP].origPath):
+- all_configs[CFG_LDAP].backup(self.backupDir)
+- self.writeLDAP2(all_configs[CFG_LDAP].origPath,
+- "uri", "host", "base", True, True, True)
+ if os.path.isfile(all_configs[CFG_NSSLDAP].origPath):
+ all_configs[CFG_NSSLDAP].backup(self.backupDir)
+ self.writeLDAP2(all_configs[CFG_NSSLDAP].origPath,
+@@ -4443,11 +4451,11 @@ class AuthInfo:
self.uninstallIPA()
def testLDAPCACerts(self):
@@ -97,7 +140,12 @@ diff -up authconfig-6.2.10/authinfo.py.cacertdir authconfig-6.2.10/authinfo.py
try:
os.stat(self.ldapCacertDir)
except OSError as err:
-@@ -4455,7 +4468,7 @@ class AuthInfo:
+- if err == errno.ENOENT:
++ if err.errno == errno.ENOENT:
+ os.mkdir(self.ldapCacertDir, 0o755)
+
+ return isEmptyDir(self.ldapCacertDir)
+@@ -4455,7 +4463,7 @@ class AuthInfo:
def rehashLDAPCACerts(self):
if ((self.enableLDAP or self.enableLDAPAuth) and
diff --git a/authconfig.spec b/authconfig.spec
index bf5416a..27021a9 100644
--- a/authconfig.spec
+++ b/authconfig.spec
@@ -1,7 +1,7 @@
Summary: Command line tool for setting up authentication from network services
Name: authconfig
Version: 6.2.10
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv2+
ExclusiveOS: Linux
Group: System Environment/Base
@@ -143,6 +143,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/256x256/apps/system-config-authentication.*
%changelog
+* Wed Apr 1 2015 Tomáš Mráz <tmraz at redhat.com> - 6.2.10-6
+- fix regression from the python 3 compat patch
+
* Tue Mar 31 2015 Tomáš Mráz <tmraz at redhat.com> - 6.2.10-5
- set default tls_cacertdir when no ldap.conf is present
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/authconfig.git/commit/?h=master&id=32d67a8d1d9d14ece6f49b3c12ac78eecae1b15a
More information about the scm-commits
mailing list