fix auth module some more

This commit is contained in:
Timo Aaltonen
2014-04-10 11:01:35 +03:00
parent 0cad65e728
commit 81869f54eb
2 changed files with 7 additions and 19 deletions

View File

@@ -52,7 +52,7 @@ Date: Fri Mar 1 12:21:00 2013 +0200
+check_selinux_status = redhat.check_selinux_status
--- /dev/null
+++ b/ipapython/platform/debian/auth.py
@@ -0,0 +1,44 @@
@@ -0,0 +1,33 @@
+from ipapython import ipautil
+from ipapython.platform import base
+
@@ -71,27 +71,16 @@ Date: Fri Mar 1 12:21:00 2013 +0200
+ """
+
+ def __build_args(self):
+ args = ['--force']
+ args = ['--force --package']
+ for (option, value) in self.parameters.items():
+ if option == "sssdauth":
+ option = "sss"
+ # only sssd supported, filter the dupe
+ elif option in ["sssd", "krb5", "ldap", "update"]:
+ continue
+ if type(value) is bool:
+ if value:
+ if not "package" in args:
+ args.append("--package %s" % (option))
+ else:
+ args.append("%s" % (option))
+ else:
+ if not any("remove" in s for s in args):
+ args.append("--remove %s" % (option))
+ else:
+ args.append("%s" % (option))
+ if type(value) is bool and not value:
+ if not any("remove" in s for s in args):
+ args.append("--remove")
+ args.append("%s" % (option))
+ return args
+
+
+ def execute(self):
+ env = {"DEBCONF_FRONTEND" : "noninteractive"}
+ args = self.__build_args()

View File

@@ -1,5 +1,3 @@
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index 81e7aa3..ce5f2a0 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -380,7 +380,7 @@ class KerbTransport(SSLTransport):
@@ -10,3 +8,4 @@ index 81e7aa3..ce5f2a0 100644
+ (rc, vc) = kerberos.authGSSClientInit(service, gssflags=self.flags)
except kerberos.GSSError, e:
self._handle_exception(e)