LeMaker / image-create-tools

3 stars 1 forks source link

Unsafe temp file handling, non-existing check of necessary prerequisites, insane/non-existing error handling #1

Open ThomasKaiser opened 9 years ago

ThomasKaiser commented 9 years ago

Since this stuff is supposed to only run in specific Ubuntu releases it might be an idea to write them into some sort of readme and to try to cope with this situation within the script with an error handler.

And would you please try what happens on your system if you do a simple 'ln -s /etc/passwd /tmp/Maker.tar.gz' prior to executing this tool? Prior to releasing such dangerous stuff to the public?

hunanchenxingyu commented 9 years ago

Hi, Thomas I has improved the method to judge compressed file, please check it. The tool will compatible with the Ubuntu and Fedora System. is there a problem about System Compatibility ?

ThomasKaiser commented 9 years ago

I didn't speak about 'compressed files'. Please have a look at the contained 'maker_install.run'. This is a nightmare and not even alpha quality. Simply give it a try and execute 'ln -s /etc/passwd /tmp/Maker.tar.gz' as an unprivileged user prior to invoking your script. You won't be able to reboot the system afterwards... but hey, no risk, no fun.

There's no checking of error conditions or necessary prerequisits. And if such a script expects certain prerequisits (eg. a specific Ubuntu release as it's the case right now!) then please write this stuff in a README. At the moment this is a tool an Actions Semi or LeMaker developer might use internally (but I wouldn't trust this developer's work afterwards any longer!) but not suitable for the general public.

hunanchenxingyu commented 9 years ago

I'am fixing these issues, Thanks for your feedback

hunanchenxingyu commented 9 years ago

I has fixed these issues, please check it. Thanks for your support again

ThomasKaiser commented 9 years ago

Ok, I had a look into 'make-linux-emmc-fw'. Still no use of mktemp or any other sane way to create temporary files/dirs. Please give it a try and do a 'ln -s / .tmp' prior to calling ./make-linux-emmc-fw. Your script will try to erase the whole system. I stopped looking into it since it's not worth a look if such basics don't work.

hunanchenxingyu commented 9 years ago

I hope you can commit your patch to us to improve the script, and the script is completely open source on the github. Thanks