Skip to content

Commit

Permalink
Merge pull request #6557 from matusmarhefka/add_cap_audit_write
Browse files Browse the repository at this point in the history
Add cap_audit_write to be able to run sshd in containers

(cherry picked from commit 6a2b3e9)
  • Loading branch information
matejak authored and vojtapolasek committed Jan 25, 2021
1 parent e4f72e7 commit a8e99ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/ssg_test_suite/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ def _commit(self, container, image):

def _new_container_from_image(self, image_name, container_name):
long_name = "{0}_{1}".format(self._name_stem, container_name)
# Podman drops cap_audit_write which causes that it is not possible
# run sshd by default. Therefore, we need to add the capability.
podman_cmd = ["podman", "run", "--name", long_name,
"--cap-add=cap_audit_write",
"--publish", "{}".format(self.internal_ssh_port), "--detach", image_name,
"/usr/sbin/sshd", "-p", "{}".format(self.internal_ssh_port), "-D"]
try:
Expand Down

0 comments on commit a8e99ed

Please sign in to comment.