-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
possible rm -rf /
during screen installation
#488
Comments
When choosing to install KlipperScreen with KIAUH, it's actually KlipperScreens own install script that gets executed by KIAUH. I am not sure if there is any constellation where the value of |
Before KIAUH runs KlipperScreen's installation script, KIAUH removes any existing KlipperScreen directory kiauh/scripts/klipperscreen.sh Line 50 in a929c69
leading into a first possible case of this unintended behavior if KLIPPERSCREEN_DIR is evaluated to "/" for some reason then KS install script is executed
which means if KLIPPERSCREEN_VENV is set use that, and if that is evaluated into "/" you would have the same possible issue again the else uses /home/username/.KlipperScreen-env, even if HOME is evaluated into nothing the tail It's worth noting that nor KLIPPERSCREEN_DIR or KLIPPERSCREEN_VENV are set by KlipperScreen or it's standalone installer, those are external variables for other installers This leads me to the conclusion that every rm -rf should be double checked against "/" just in case, even if i find this scenario very unlikely |
Ah yes you are correct, there is a rm -rf before executing the KlipperScreen script. KLIPPERSCREEN_DIR is defined here: https://github.com/dw-0/kiauh/blob/master/scripts/globals.sh#L51 From my perspective that cannot be "/" in any case, nor can the KSENV from your script be "/". No idea what happened there... |
I suspect that something might be off because I didn't have klipper installed, as the second time, that I installed ks after klipper, it worked. I saw that it broke after or during installation of requirements for venv |
…n invalid external variable was set dw-0/kiauh#488
Linux Distribution
rpiOS legacy 32bit on rpi3b
What happened
rm -rf /
What did you expect to happen
idk what should happen, raised an exception, install successful, either way, not
rm -rf /
How to reproduce
Additional information
I don't have any logs, because, yeah...
The text was updated successfully, but these errors were encountered: