Skip to content

Commit 4cdaf3c

Browse files
committed
fix(snap): use bundled ssh client under strict confinement
Strict snap sandbox connect/create shells were still trying to exec the host OpenSSH binary. Observed failure: - `apparmor="DENIED" operation="exec" class="file" profile="snap.openshell.openshell" name="/usr/bin/ssh" requested_mask="x" denied_mask="x"` Bundle `openssh-client` in the snap so the CLI uses the bundled binary under strict confinement. Signed-off-by: Alex Lewontin <alex.lewontin@canonical.com>
1 parent 26a02f1 commit 4cdaf3c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

python/openshell/release_formula_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def test_snap_cli_sets_system_gateway_dir_via_app_env() -> None:
143143

144144
assert "command: bin/openshell" in snapcraft
145145
assert 'OPENSHELL_SYSTEM_GATEWAY_DIR: "$SNAP_COMMON/system-gateways"' in snapcraft
146+
assert "- openssh-client" in snapcraft
146147

147148

148149
def test_rpm_spec_uses_gateway_defaults_without_config_helper() -> None:

snap/snapcraft.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ parts:
8181
- e2fsprogs
8282
- iproute2
8383
- nftables
84+
- openssh-client
8485
override-pull: |
8586
craftctl default
8687
craftctl set version="$(python3 "$CRAFT_PROJECT_DIR/tasks/scripts/release.py" get-version --snap)"

0 commit comments

Comments
 (0)