From 0f2120e25ed33c08e4299d6a24e3e2551834de04 Mon Sep 17 00:00:00 2001 From: Jack Greiner Date: Sat, 21 Sep 2024 20:19:05 -0400 Subject: [PATCH] util.py: Turns out we can use permissions octals instead here. --- util.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util.py b/util.py index 914add2..a957b31 100644 --- a/util.py +++ b/util.py @@ -7,7 +7,6 @@ import re import shutil import signal -import stat import tarfile import zipfile import subprocess @@ -485,9 +484,7 @@ def patch_libcuda() -> bool: f.write(patched_binary_data) # Set permissions to rwxr-xr-x (755) - os.chmod(patched_library, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | # Owner: rwx - stat.S_IRGRP | stat.S_IXGRP | # Group: r-x - stat.S_IROTH | stat.S_IXOTH) # Others: r-x + os.chmod(patched_library, 0o755) log.debug(f'Permissions set to rwxr-xr-x for {patched_library}') except OSError as e: log.crit(f'Unable to write patched libcuda.so to {patched_library}: {e}')