From 62b4656571be6e8671ada295047eac385d330f66 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 20 Oct 2014 16:08:06 -0400 Subject: In configure we do not need to set_config() All we care about in configure is to store the config in the db, so skip setting the config explicitly in the plugin object and go straight to the database. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/login/authfas.py | 3 +-- ipsilon/login/authform.py | 3 +-- ipsilon/login/authkrb.py | 3 +-- ipsilon/login/authldap.py | 6 ++---- ipsilon/login/authpam.py | 6 ++---- ipsilon/login/authtest.py | 3 +-- 6 files changed, 8 insertions(+), 16 deletions(-) (limited to 'ipsilon/login') diff --git a/ipsilon/login/authfas.py b/ipsilon/login/authfas.py index 2759626..c2d8fff 100755 --- a/ipsilon/login/authfas.py +++ b/ipsilon/login/authfas.py @@ -211,5 +211,4 @@ class Installer(object): order = [] order.append('fas') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) diff --git a/ipsilon/login/authform.py b/ipsilon/login/authform.py index 9c20cf5..418a5e5 100755 --- a/ipsilon/login/authform.py +++ b/ipsilon/login/authform.py @@ -144,8 +144,7 @@ class Installer(object): order = [] order.append('form') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) # for selinux enabled platforms, ignore if it fails just report try: diff --git a/ipsilon/login/authkrb.py b/ipsilon/login/authkrb.py index 724c2ce..6c561ac 100755 --- a/ipsilon/login/authkrb.py +++ b/ipsilon/login/authkrb.py @@ -164,5 +164,4 @@ class Installer(object): order = [] order.insert(0, 'krb') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) diff --git a/ipsilon/login/authldap.py b/ipsilon/login/authldap.py index a41d167..ed75e91 100755 --- a/ipsilon/login/authldap.py +++ b/ipsilon/login/authldap.py @@ -212,8 +212,7 @@ class Installer(object): if 'ldap_bind_dn_template' in opts: config['bind dn template'] = opts['ldap_bind_dn_template'] config['tls'] = 'Demand' - po.set_config(config) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, config) # Update global config to add login plugin po = PluginObject() @@ -225,5 +224,4 @@ class Installer(object): order = [] order.append('ldap') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) diff --git a/ipsilon/login/authpam.py b/ipsilon/login/authpam.py index 35edbaf..10b550e 100755 --- a/ipsilon/login/authpam.py +++ b/ipsilon/login/authpam.py @@ -145,8 +145,7 @@ class Installer(object): po.wipe_config_values(FACILITY) config = {'service name': opts['pam_service']} - po.set_config(config) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, config) # Update global config to add login plugin po = PluginObject() @@ -158,8 +157,7 @@ class Installer(object): order = [] order.append('pam') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) # for selinux enabled platforms, ignore if it fails just report try: diff --git a/ipsilon/login/authtest.py b/ipsilon/login/authtest.py index 44492a4..6288826 100755 --- a/ipsilon/login/authtest.py +++ b/ipsilon/login/authtest.py @@ -127,5 +127,4 @@ class Installer(object): order = [] order.append('testauth') globalconf['order'] = ','.join(order) - po.set_config(globalconf) - po.save_plugin_config(FACILITY) + po.save_plugin_config(FACILITY, globalconf) -- cgit