Add sudo into instack's semanage call.

When having a file with incorrect SELinux context
in /home/stac/.ssh a permission error is displayed
at the time of running semanage during Pike to
Queens undercloud upgrade.

Closes-Bug: #1767405
Change-Id: I994917e491d6f8b4141a3c332c79ed8e8ce8e64c
This commit is contained in:
Jose Luis Franco Arza 2018-04-27 17:18:09 +02:00
parent 64c9d2e610
commit a96a0239cf
1 changed files with 1 additions and 1 deletions

View File

@ -1662,7 +1662,7 @@ def _ensure_ssh_selinux_permission():
wrong_perm = True
break
if wrong_perm:
cmd = ['semanage',
cmd = ['sudo', 'semanage',
'fcontext', '-a', '-t', 'ssh_home_t',
"{}(/.*)?".format(ssh_path)]
_run_command(cmd)