Skip to content

Commit

Permalink
qemu_guest_agent: selinux should be optimised.
Browse files Browse the repository at this point in the history
selinux should be permissive when call _change_bl.
in case effect other cases.

Signed-off-by: Dehan Meng <[email protected]>
  • Loading branch information
6-dehan committed Dec 13, 2024
1 parent 3f60e13 commit cb6fce7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qemu/tests/qemu_guest_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,11 @@ def _change_bl(self, session):
"""

if self.params.get("os_type") == "linux":
error_context.context(
"Set selinux policy to 'Permissive' mode in guest.", LOG_JOB.info
)
if session.cmd_output("getenforce").strip() != "Permissive":
session.cmd("setenforce 0")
cmd_blacklist_backup = self.params["black_file_backup"]
session.cmd(cmd_blacklist_backup)
full_qga_ver = self._get_qga_version(session, self.vm, main_ver=False)
Expand Down

0 comments on commit cb6fce7

Please sign in to comment.