systemd: Fix error message when joining AD domains

Installing cockpit-ws credentials is only supported for FreeIPA. When
joining an AD domain, trying to call the `ipa` command line client will
just thrown an error message "IPA client is not configured on this
system". This appears in the "Join Domain" dialog without further
details, but the joining works anyway, so this was rather confusing.

Only actually run install_ws_credentials() when the Server software is
"ipa".

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1813136

Closes #13803
This commit is contained in:
Martin Pitt 2020-03-27 17:05:29 +01:00 committed by GitHub
parent bb0acd825b
commit 663c2e4f12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -383,6 +383,12 @@ function instance(realmd, mode, realm, state) {
if (cockpit.transport.host !== "localhost")
return cockpit.resolve();
const server_sw = find_detail(realm, "server-software");
if (server_sw !== "ipa") {
console.log("installing ws credentials not supported for server software", server_sw);
return cockpit.resolve();
}
if (auth !== "password/administrator") {
console.log("Installing kerberos keytab and SSL certificate not supported for auth mode", auth);
return cockpit.resolve();