Skip to content

Commit

Permalink
fix: Set salt home directory permissions
Browse files Browse the repository at this point in the history
Closes #211
  • Loading branch information
cdalvaro committed Sep 14, 2023
1 parent 1fd232f commit 8f55384
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This file only reflects the changes that are made in this image.
Please refer to the [Salt 3006.3 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3006.3.html)
for the list of changes in SaltStack.

**3006.3_1**

- Fix salt home directory permissions. Issue #211

**3006.3**

- Upgrade `salt-master` to `3006.3` *Sulfur*.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG VCS_REF

# https://github.com/saltstack/salt/releases
ENV SALT_VERSION="3006.3"
ENV IMAGE_VERSION="${SALT_VERSION}"
ENV IMAGE_VERSION="${SALT_VERSION}_1"

ENV SALT_DOCKER_DIR="/etc/docker-salt" \
SALT_ROOT_DIR="/etc/salt" \
Expand Down
4 changes: 4 additions & 0 deletions assets/build/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ apt-get clean --yes
rm -rf /var/lib/apt/lists/*

export -n DEBIAN_FRONTEND

# Set home directory permissions
log_info "Setting ${SALT_USER} home directory permissions ..."
chown -R "${SALT_USER}:${SALT_USER}" "${SALT_HOME}"
5 changes: 5 additions & 0 deletions tests/basic/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ ok "salt-minion started"

salt "${TEST_MINION_ID}" test.ping || error "${TEST_MINION_ID} ping"
ok "${TEST_MINION_ID} ping"

# Test salt home permissions
# shellcheck disable=SC2016
docker-exec bash -c 'test $(stat -c "%U:%G" "${SALT_HOME}") = "${SALT_USER}:${SALT_USER}"' || error "salt home permissions"
ok "salt home permissions"

0 comments on commit 8f55384

Please sign in to comment.