Skip to content

Commit dde239d

Browse files
authored
Fix sed command to remove last line in sudoers file
This way the `DOCKER_USER` variable won't accidentally retain sudoer permissions for any user not named `coder` (almost certainly a security hole).
1 parent 53d981a commit dde239d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/release-image/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ "${DOCKER_USER-}" ]; then
1414
sudo usermod --login "$DOCKER_USER" coder
1515
sudo groupmod -n "$DOCKER_USER" coder
1616

17-
sudo sed -i "/coder/d" /etc/sudoers.d/nopasswd
17+
sudo sed -i '$d' /etc/sudoers.d/nopasswd
1818
fi
1919
fi
2020

0 commit comments

Comments
 (0)