Skip to content

Commit

Permalink
util.py: Turns out we can use permissions octals instead here.
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectSynchro committed Sep 22, 2024
1 parent 0978551 commit 0f2120e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import re
import shutil
import signal
import stat
import tarfile
import zipfile
import subprocess
Expand Down Expand Up @@ -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}')
Expand Down

0 comments on commit 0f2120e

Please sign in to comment.