diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-26 08:48:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-26 08:48:42 +0000 |
commit | 1848925af2ca2cbfaac2bf7de39b007c314a01f7 (patch) | |
tree | 3ef4517b7a7958d13225a7e0d023ebb38013190b /perl-install | |
parent | 539e523fd320e8141bd9d0f2171508720816c6a2 (diff) | |
download | drakx-1848925af2ca2cbfaac2bf7de39b007c314a01f7.tar drakx-1848925af2ca2cbfaac2bf7de39b007c314a01f7.tar.gz drakx-1848925af2ca2cbfaac2bf7de39b007c314a01f7.tar.bz2 drakx-1848925af2ca2cbfaac2bf7de39b007c314a01f7.tar.xz drakx-1848925af2ca2cbfaac2bf7de39b007c314a01f7.zip |
configure sshd to use PAM when needed (sshd config file is modified, but i did not test more)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/authentication.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 783fadac7..42ffd3b84 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -144,6 +144,8 @@ sub set { log::l("authentication::set $kind"); + sshd_config_UsePAM($kind ne 'local'); + if ($kind eq 'LDAP') { $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs)); @@ -528,6 +530,18 @@ sub krb5_conf_update { } +sub sshd_config_UsePAM { + my ($UsePAM) = @_; + my $sshd = "$::prefix/etc/ssh/sshd_config"; + -e $sshd or return; + + my $val = "UsePAM " . bool2yesno($UsePAM); + substInFile { + $val = '' if s/^#?UsePAM.*/$val/; + $_ .= "$val\n" if eof && $val; + } $sshd; +} + sub query_srv_names { my ($domain) = @_; |