diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-08-07 11:09:38 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-09-26 12:12:59 +0200 |
commit | dea825fd9cdd36a6fa371b2a5e1d1f35c177c6ef (patch) | |
tree | defb4747edb4fbdfde9c954d3d4e7daabb906690 /ipatests/test_integration | |
parent | c7d6fea06f17ecceb3d7c6aae57cc7b9f4fe4c9f (diff) | |
download | freeipa-dea825fd9cdd36a6fa371b2a5e1d1f35c177c6ef.tar.gz freeipa-dea825fd9cdd36a6fa371b2a5e1d1f35c177c6ef.tar.xz freeipa-dea825fd9cdd36a6fa371b2a5e1d1f35c177c6ef.zip |
ipa-restore: Set SELinux booleans when restoring
https://fedorahosted.org/freeipa/ticket/4157
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
Diffstat (limited to 'ipatests/test_integration')
-rw-r--r-- | ipatests/test_integration/test_backup_and_restore.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index 4b5200205..3cf0d5d70 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -146,3 +146,32 @@ class TestBackupAndRestore(IntegrationTest): stdin_text=dirman_password + '\nyes') finally: self.master.run_command(['userdel', 'ipatest_user1']) + + def test_full_backup_and_restore_with_selinux_booleans_off(self): + """regression test for https://fedorahosted.org/freeipa/ticket/4157""" + with restore_checker(self.master): + backup_path = backup(self.master) + + self.log.info('Backup path for %s is %s', self.master, backup_path) + + self.master.run_command(['ipa-server-install', + '--uninstall', + '-U']) + + self.master.run_command([ + 'setsebool', '-P', + 'httpd_can_network_connect=off', + 'httpd_manage_ipa=off', + ]) + + dirman_password = self.master.config.dirman_password + self.master.run_command(['ipa-restore', backup_path], + stdin_text=dirman_password + '\nyes') + + result = self.master.run_command([ + 'getsebool', + 'httpd_can_network_connect', + 'httpd_manage_ipa', + ]) + assert 'httpd_can_network_connect --> on' in result.stdout_text + assert 'httpd_manage_ipa --> on' in result.stdout_text |