diff options
author | Tomas Babej <tbabej@redhat.com> | 2013-10-09 12:23:18 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-10-14 11:11:17 +0200 |
commit | 4a95a50596fb86ce9de82b2c2a0517d3aa341950 (patch) | |
tree | 95f4a980cda597c10698eb8f90b53776e07de1fe /ipaserver | |
parent | 285ed59889590ddd0d6ca2e2a030b28527941cbf (diff) | |
download | freeipa-4a95a50596fb86ce9de82b2c2a0517d3aa341950.tar.gz freeipa-4a95a50596fb86ce9de82b2c2a0517d3aa341950.tar.xz freeipa-4a95a50596fb86ce9de82b2c2a0517d3aa341950.zip |
ipa-upgradeconfig: Remove backed up smb.conf
Since we are not able to properly restore the Samba server to the
working state after running ipa-adtrust-install, we should not keep
the smb.conf in the fstore.
This patch makes sure that any backed up smb.conf is removed from
the backup and that this file is not backed up anymore.
Part of: https://fedorahosted.org/freeipa/ticket/3479
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/adtrustinstance.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index b3046386b..140c8d769 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -365,8 +365,6 @@ class ADTRUSTInstance(service.Service): self.admin_conn.add_entry(entry) def __write_smb_conf(self): - self.fstore.backup_file(self.smb_conf) - conf_fd = open(self.smb_conf, "w") conf_fd.write('### Added by IPA Installer ###\n') conf_fd.write('[global]\n') @@ -863,18 +861,17 @@ class ADTRUSTInstance(service.Service): except: pass - for r_file in [self.smb_conf]: - try: - self.fstore.restore_file(r_file) - except ValueError, error: - root_logger.debug(error) - pass + # Since we do not guarantee restoring back to working samba state, + # we should not restore smb.conf + + # Restore the state of affected selinux booleans for var in self.selinux_booleans: sebool_state = self.restore_state(var) if not sebool_state is None: try: - ipautil.run(["/usr/sbin/setsebool", "-P", var, sebool_state]) + ipautil.run(["/usr/sbin/setsebool", + "-P", var, sebool_state]) except: self.print_msg(SELINUX_WARNING % dict(var=var)) |