Merge pull request #67 from technion/master

Insecure tmp file handling
This commit is contained in:
popcornmix
2013-03-06 07:44:44 -08:00

View File

@@ -42,7 +42,7 @@ function update_self() {
exit 1 exit 1
fi fi
cat > /tmp/updateScript.sh << EOF cat > /root/.updateScript.sh << EOF
#!/bin/bash #!/bin/bash
if mv "${_tempFileName}" "$0"; then if mv "${_tempFileName}" "$0"; then
rm -- "\$0" rm -- "\$0"
@@ -53,7 +53,7 @@ function update_self() {
EOF EOF
echo " *** Relaunching after update" echo " *** Relaunching after update"
exec /bin/bash /tmp/updateScript.sh exec /bin/bash /root/.updateScript.sh
} }
function update_modules { function update_modules {