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
(cherry picked from commit a96a0239cf
)
This commit is contained in:
parent
68b7bfb36f
commit
0b94f10270
|
@ -1675,7 +1675,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)
|
||||
|
|
Loading…
Reference in New Issue