Skip to content

Commit

Permalink
Fix for SELinux handling logic
Browse files Browse the repository at this point in the history
The old procedure was crashing with signal 9 SIGKILL, this should fix that problem
  • Loading branch information
RodoMa92 committed Aug 23, 2023
1 parent 193f97d commit 4ca21ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ async def do_update(self):
shutil.move(path.join(getcwd(), download_temp_filename), path.join(getcwd(), download_filename))
chmod(path.join(getcwd(), download_filename), 777, False)
if get_selinux():
from subprocess import call
call(["chcon", "-t", "bin_t", path.join(getcwd(), download_filename)])
from asyncio.subprocess import create_subprocess_exec
process = await create_subprocess_exec(["chcon", "-t", "bin_t", path.join(getcwd(), download_filename)])
logger.info(f"Setting the executable flag with chcon returned {process.returncode}")

logger.info("Updated loader installation.")
await tab.evaluate_js("window.DeckyUpdater.finish()", False, False)
Expand Down

0 comments on commit 4ca21ab

Please sign in to comment.