summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-08-07 11:09:38 +0200
committerMartin Kosek <mkosek@redhat.com>2014-09-26 12:12:59 +0200
commitdea825fd9cdd36a6fa371b2a5e1d1f35c177c6ef (patch)
treedefb4747edb4fbdfde9c954d3d4e7daabb906690 /ipatests/test_integration
parentc7d6fea06f17ecceb3d7c6aae57cc7b9f4fe4c9f (diff)
downloadfreeipa-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.py29
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