mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 21:03:19 -07:00
Fix major security risk with cronwrapper
This commit is contained in:
parent
a43db693e0
commit
89a59cf923
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue