diff options
author | Simo Sorce <simo@redhat.com> | 2014-03-14 18:08:49 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-03-20 11:34:08 -0400 |
commit | 1d7df9dbac43b63424ee07ebfb86c6a106dcb43c (patch) | |
tree | 8492c4ccaa3d57a7625682eeadd98d28897121ab /ipsilon/login/authpam.py | |
parent | 7efffe85403fbaa1335186b311ad7ac8ea19ad1e (diff) | |
download | ipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.tar.gz ipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.tar.xz ipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.zip |
Add server-install plugin configuration support
Automatically find plugins installed in the system and exposes their
installation and configuration functions through the installer.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/login/authpam.py')
-rwxr-xr-x | ipsilon/login/authpam.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ipsilon/login/authpam.py b/ipsilon/login/authpam.py index 496a774..1eb697b 100755 --- a/ipsilon/login/authpam.py +++ b/ipsilon/login/authpam.py @@ -143,3 +143,24 @@ for authentication. """ def get_tree(self, site): self.page = Pam(site, self) return self.page + + +class Installer(object): + + def __init__(self): + self.name = 'pam' + self.ptype = 'login' + + def install_args(self, group): + group.add_argument('--pam', choices=['yes', 'no'], default='no', + help='Configure PAM authentication') + group.add_argument('--pam-service', action='store', default='remote', + help='PAM service name to use for authentication') + + def configure(self, opts): + if opts['pam'] != 'yes': + return + + if opts['pam_service'] != 'remote': + #TODO: add service_name in the database + return |