Skip to content

Commit

Permalink
Merge pull request #122 from JonathonReinhart/121-fix-ldd-warnings
Browse files Browse the repository at this point in the history
Fix ldd "you do not have execution..." warning
  • Loading branch information
JonathonReinhart authored Jan 30, 2020
2 parents 45dbc33 + dce7170 commit 36260d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Correct handling of absolute path symlink in ldd output ([#118])
- Fixed null tmpdir argument error on GCC9 ([#120])
- Fixed ldd "you do not have execution permission..." warning ([#122])


## [0.9.0] - 2020-01-11
Expand Down Expand Up @@ -156,3 +157,4 @@ Initial release
[#112]: https://github.com/JonathonReinhart/staticx/pull/112
[#118]: https://github.com/JonathonReinhart/staticx/pull/118
[#120]: https://github.com/JonathonReinhart/staticx/pull/120
[#122]: https://github.com/JonathonReinhart/staticx/pull/122
2 changes: 1 addition & 1 deletion staticx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def make_mode_executable(mode):

def make_executable(path):
mode = os.stat(path).st_mode
make_mode_executable(mode)
mode = make_mode_executable(mode)
os.chmod(path, mode)

def get_symlink_target(path):
Expand Down
10 changes: 10 additions & 0 deletions unittest/test_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import tempfile
import os

from staticx import utils

def test_make_executable():
with tempfile.NamedTemporaryFile() as tf:
assert (os.stat(tf.name).st_mode & 0o111) == 0
utils.make_executable(tf.name)
assert (os.stat(tf.name).st_mode & 0o111) != 0

0 comments on commit 36260d0

Please sign in to comment.