Fix major security risk with cronwrapper

This commit is contained in:
Alex Malinovich 2016-11-29 21:02:50 -08:00
commit 89a59cf923

View file

@ -206,6 +206,10 @@ cleanup() {
if [ -d "${plexupdate_path}/.git" ]; then if [ -d "${plexupdate_path}/.git" ]; then
chown -R --reference="${plexupdate_path}" "${plexupdate_path}/" &> /dev/null chown -R --reference="${plexupdate_path}" "${plexupdate_path}/" &> /dev/null
fi fi
if [ -f "${plexupdate_path}/extras/cronwrapper" -a $EUID -eq 0 ]; then
chown root:root "${plexupdate_path}/extras/cronwrapper" &> /dev/null
fi
} }
trap cleanup EXIT trap cleanup EXIT