From e9490a1a1092972acb78f855b5c23f248b91e7e1 Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Mon, 24 Apr 2023 16:40:00 -0400 Subject: [PATCH] SSSD config changes --- src/config.jsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/config.jsx b/src/config.jsx index 9a485b9..50c5a31 100644 --- a/src/config.jsx +++ b/src/config.jsx @@ -430,7 +430,7 @@ class SssdConfig extends React.Component { } customIniUnparser(obj) { - return ini.stringify(obj).replace('domainnssfiles', 'domain/nssfiles'); + return ini.stringify(obj, { platform: 'linux' }).replace('domainnssfiles', 'domain/nssfiles'); } restartSSSD() { @@ -444,14 +444,18 @@ class SssdConfig extends React.Component { /* Update nsswitch, this will fail on RHEL8/F34 and lower as 'with-files-domain' feature is not added there */ const authselect_cmd = ["authselect", "select", "sssd", "with-files-domain", "--force"]; this.setState({ submitting: true }); - this.file.replace(obj).done(() => { - cockpit.spawn(chmod_cmd, { superuser: "require" }) - .then(() => { - cockpit.spawn(authselect_cmd, { superuser: "require" }) - .then(this.restartSSSD) - .catch(this.restartSSSD); - }); - }); + this.file.replace(obj) + .then(tag => { + cockpit.spawn(chmod_cmd, { superuser: "require" }) + .then(() => { + cockpit.spawn(authselect_cmd, { superuser: "require" }) + .then(this.restartSSSD) + .catch(this.restartSSSD); + }); + }) + .catch(error => { + console.error(error); + }); } componentDidMount() {