SSSD config changes

This commit is contained in:
Justin Stephenson 2023-04-24 16:40:00 -04:00
parent cc2a205b13
commit e9490a1a10

View file

@ -430,7 +430,7 @@ class SssdConfig extends React.Component {
} }
customIniUnparser(obj) { customIniUnparser(obj) {
return ini.stringify(obj).replace('domainnssfiles', 'domain/nssfiles'); return ini.stringify(obj, { platform: 'linux' }).replace('domainnssfiles', 'domain/nssfiles');
} }
restartSSSD() { 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 */ /* 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"]; const authselect_cmd = ["authselect", "select", "sssd", "with-files-domain", "--force"];
this.setState({ submitting: true }); this.setState({ submitting: true });
this.file.replace(obj).done(() => { this.file.replace(obj)
cockpit.spawn(chmod_cmd, { superuser: "require" }) .then(tag => {
.then(() => { cockpit.spawn(chmod_cmd, { superuser: "require" })
cockpit.spawn(authselect_cmd, { superuser: "require" }) .then(() => {
.then(this.restartSSSD) cockpit.spawn(authselect_cmd, { superuser: "require" })
.catch(this.restartSSSD); .then(this.restartSSSD)
}); .catch(this.restartSSSD);
}); });
})
.catch(error => {
console.error(error);
});
} }
componentDidMount() { componentDidMount() {