Mageia Bugzilla – Attachment 9748 Details for
Bug 21594
Update request: Kodi 17.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Updated the CheckPerms patch for Kodi-17.5
kodi-17.5-checkperms.patch (text/plain), 1.21 KB, created by
Stig-Ørjan Smelror
on 2017-10-23 09:06:29 CEST
(
hide
)
Description:
Updated the CheckPerms patch for Kodi-17.5
Filename:
MIME Type:
Creator:
Stig-Ørjan Smelror
Created:
2017-10-23 09:06:29 CEST
Size:
1.21 KB
patch
obsolete
>--- xbmc-17.5-Krypton/tools/Linux/kodi.sh.in.orig 2017-10-23 09:00:25.257151075 +0200 >+++ xbmc-17.5-Krypton/tools/Linux/kodi.sh.in 2017-10-23 09:04:11.041526123 +0200 >@@ -27,7 +27,7 @@ > LIBDIR="@libdir@" > CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME} > USERDATA_DIR="${HOME}/.${bin_name}" >- >+USERDATA_PERMS="700" > > # Workaround for high CPU load with nvidia GFX > export __GL_YIELD=USLEEP >@@ -35,6 +35,17 @@ > # Fix wasting RAM due to fragmentation > export MALLOC_MMAP_THRESHOLD_=131072 > >+check_perms() >+{ >+if [ -d "${USERDATA_DIR}" ]; then >+ CURRENT_PERMS="$(stat -c '%a' ${USERDATA_DIR})" >+ if [ $USERDATA_PERMS != $CURRENT_PERMS ]; then >+ echo "INFO: $USERDATA_DIR is world readable!" >+ echo "INFO: switching to $USERDATA_PERMS" >+ chmod $USERDATA_PERMS $USERDATA_DIR >+ fi >+fi >+} > > # Check for some options used by this script > while [ "$#" -gt "0" ] >@@ -151,6 +162,9 @@ > > migrate_home > >+# Check and fix perms after having migrated home >+check_perms >+ > if command_exists gdb; then > # Output warning in case ulimit is unsupported by shell > eval ulimit -c unlimited >@@ -174,4 +188,8 @@ > fi > done > >+# Check perm again, for first ever start of kodi, USERDATA_DIR did not >+# yet exist before >+check_perms >+ > exit $RET
--- xbmc-17.5-Krypton/tools/Linux/kodi.sh.in.orig 2017-10-23 09:00:25.257151075 +0200 +++ xbmc-17.5-Krypton/tools/Linux/kodi.sh.in 2017-10-23 09:04:11.041526123 +0200 @@ -27,7 +27,7 @@ LIBDIR="@libdir@" CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME} USERDATA_DIR="${HOME}/.${bin_name}" - +USERDATA_PERMS="700" # Workaround for high CPU load with nvidia GFX export __GL_YIELD=USLEEP @@ -35,6 +35,17 @@ # Fix wasting RAM due to fragmentation export MALLOC_MMAP_THRESHOLD_=131072 +check_perms() +{ +if [ -d "${USERDATA_DIR}" ]; then + CURRENT_PERMS="$(stat -c '%a' ${USERDATA_DIR})" + if [ $USERDATA_PERMS != $CURRENT_PERMS ]; then + echo "INFO: $USERDATA_DIR is world readable!" + echo "INFO: switching to $USERDATA_PERMS" + chmod $USERDATA_PERMS $USERDATA_DIR + fi +fi +} # Check for some options used by this script while [ "$#" -gt "0" ] @@ -151,6 +162,9 @@ migrate_home +# Check and fix perms after having migrated home +check_perms + if command_exists gdb; then # Output warning in case ulimit is unsupported by shell eval ulimit -c unlimited @@ -174,4 +188,8 @@ fi done +# Check perm again, for first ever start of kodi, USERDATA_DIR did not +# yet exist before +check_perms + exit $RET
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21594
: 9748 |
9753
|
9754