fix (project-clone) : update user_setup script to modify /etc/passwd permissions/ownership #1499
Conversation
|
Skipping CI for Draft Pull Request. |
51b9337 to
1cb158d
Compare
/etc/passwd permissions/ownership/etc/passwd permissions/ownership
|
/ok-to-test |
1cb158d to
f3f26ab
Compare
|
/ok-to-test |
|
/retest |
build/bin/user_setup
Outdated
| @@ -7,7 +7,7 @@ chown ${USER_UID}:0 ${HOME} | |||
| chmod ug+rwx ${HOME} | |||
|
|
|||
| # runtime user will need to be able to self-insert in /etc/passwd | |||
There was a problem hiding this comment.
Could we delete this comment?
# runtime user will need to be able to self-insert in /etc/passwd
…` permissions/ownership Update user_setup script to not make `/etc/passwd` group writable Signed-off-by: Rohan Kumar <rohaan@redhat.com>
f3f26ab to
e424513
Compare
|
@rohanKanojia: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akurinnoy, dkwon17, rohanKanojia The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
What does this PR do?
We have a script that's used in Dockerfiles to setup users, it sets these permissions for
/etc/passwd:devworkspace-operator/build/bin/user_setup
Line 10 in 6f01ac3
This gets used in both main image and project-clone image:
devworkspace-operator/build/Dockerfile
Line 52 in 6f01ac3
devworkspace-operator/project-clone/Dockerfile
Line 52 in 6f01ac3
Update user_setup script to not make
/etc/passwdgroup writableWhat issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-9380
Is it tested? How?
project-clone:docker build . -f project-clone/Dockerfile -t <registry>/<user>/project-clone:next/etc/passwd(it should NOT be group writable):devworkspace-operator : $ docker run --rm docker.io/rohankanojia/project-clone:next ls -lt /etc/passwd -rw-r--r-- 1 root root 533 Feb 7 2024 /etc/passwdmain branch behavior:
Verifying on CRC and minikube
I verified these steps:
export PROJECT_CLONE_IMG=<registry>/<user>/project-clone:nextexport DWO_IMG=<registry>/<user>/devworkspace-controller:nextmake dockermake installoc create -f samples/code-latest.yamlRunningstateproject-cloneinit-container logs to see if project cloned successfuly:oc logs -l controller.devfile.io/devworkspace_name=code-latest -cproject-clonePR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-pathto trigger)v8-devworkspace-operator-e2e: DevWorkspace e2e testv8-che-happy-path: Happy path for verification integration with Che