summaryrefslogtreecommitdiffstats
path: root/perl-install/authentication.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r--perl-install/authentication.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 7162e1c0e..53fd50e81 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -91,7 +91,7 @@ sub ask_parameters {
$authentication->{AD_domain} ||= $net->{resolv}{DOMAINNAME};
$authentication->{AD_users_db} ||= 'cn=users,' . domain_to_ldap_domain($authentication->{AD_domain});
- $in->do_pkgs->install(qw(perl-Net-DNS));
+ $in->do_pkgs->ensure_are_installed([ 'perl-Net-DNS' ], 1) or return;
my @srvs = query_srv_names($authentication->{AD_domain});
$authentication->{AD_server} ||= $srvs[0] if @srvs;
@@ -225,9 +225,9 @@ sub set {
if ($kind eq 'local') {
} elsif ($kind eq 'SmartCard') {
- $in->do_pkgs->install('castella-pam');
+ $in->do_pkgs->ensure_are_installed([ 'castella-pam'], 1) or return;
} elsif ($kind eq 'LDAP') {
- $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs));
+ $in->do_pkgs->ensure_are_installed([ qw(openldap-clients nss_ldap pam_ldap autofs) ]) or return;
my $domain = $authentication->{LDAPDOMAIN} || do {
my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $authentication->{LDAP_server}, '-b', '', '-s', 'base', '+');
@@ -242,7 +242,7 @@ sub set {
nss_base_group => $domain . "?sub",
);
} elsif ($kind eq 'AD') {
- $in->do_pkgs->install(qw(nss_ldap pam_krb5 libsasl2-plug-gssapi));
+ $in->do_pkgs->ensure_are_installed([ qw(nss_ldap pam_krb5 libsasl2-plug-gssapi) ]) or return;
my $port = "389";
my $ssl = {
@@ -302,7 +302,7 @@ sub set {
configure_krb5_for_AD($authentication);
} elsif ($kind eq 'NIS') {
- $in->do_pkgs->install(qw(ypbind autofs));
+ $in->do_pkgs->ensure_are_installed([ qw(ypbind autofs) ], 1) or return;
my $domain = $net->{network}{NISDOMAIN};
$domain || $authentication->{NIS_server} ne "broadcast" or die N("Can not use broadcast with no NIS domain");
my $t = $domain ? "domain $domain" . ($authentication->{NIS_server} ne "broadcast" && " server") : "ypserver";
@@ -325,7 +325,7 @@ sub set {
my $domain = uc $authentication->{WINDOMAIN};
- $in->do_pkgs->install('samba-winbind');
+ $in->do_pkgs->ensure_are_installed([ 'samba-winbind' ], 1) or return;
require network::smb;
network::smb::write_smb_conf($domain);
@@ -345,7 +345,7 @@ sub set {
my $realm = $authentication->{AD_domain};
configure_krb5_for_AD($authentication);
- $in->do_pkgs->install('samba-winbind', 'pam_krb5', 'samba-server', 'samba-client');
+ $in->do_pkgs->ensure_are_installed([ 'samba-winbind', 'pam_krb5', 'samba-server', 'samba-client' ]) or return;
require network::smb;
network::smb::write_smb_ads_conf($domain,$realm);
@@ -359,6 +359,7 @@ sub set {
run_program::rooted($::prefix, 'net', 'ads', 'join', '-U', $authentication->{winuser} . '%' . $authentication->{winpass});
});
}
+ 1;
}