Open anchal-agrawal opened 7 years ago
We will do this and switch to not running as root at the same time
Nominating for 1.4.3, possibly just for the mitigation that was in #827 as it was requested for the 1.4.0 release but not included.
During VIC appliance installation, root password is required for verification. So the user who run ova-webserver process must have enough privileges to access the shadow password database, which is currently root user of VIC appliance OS. If I run ova-webserver in a container with a non-root user, it is impossible to access password database of host OS. I would like to skip this issue unless we have better approach to verify root password.
This is the pending PR to dockerize ova-webserver https://github.com/vmware/vic-product/pull/2263. Below is the code to verify root password and I can merge the fix when we have better approach to do it.
cmd := exec.Command("/etc/vmware/verify.py", vicPasswd)
@DanielXiao Is it viable to use PAM to do this password validation? Anything that allows access to shadow is dangerous.
See the example here: https://www.socketloop.com/tutorials/golang-verify-linux-user-password-again-before-executing-a-program-example
From @pstroia:
bug1958949