-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Wentao[master]: fix CentOS 7 execution permission over libnssfix_XXXX.so #200
Conversation
…XXXX.so problem - sansna
Hi @sansna, I would appreciate it if you would please open an issue before submitting a pull request that claims to fix a bug. Can you please explain exactly the problem that you are fixing?
|
Hi @JonathonReinhart , issue opened at #203 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left the following comments for your information, but I already implemented this in #204.
Also, I must point out that your commit message was oddly formatted, and should follow the format of the existing commits on the project.
@@ -13,6 +14,8 @@ def process_glibc_prog(sx): | |||
try: | |||
nssfix = copy_asset_to_tempfile(LIBNSSFIX, debug=sx.debug, | |||
prefix='libnssfix-', suffix='.so') | |||
umask=os.umask(0o755) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: This is bad because it changes the umask of the currently-running process to 0o755
.
@@ -13,6 +14,8 @@ def process_glibc_prog(sx): | |||
try: | |||
nssfix = copy_asset_to_tempfile(LIBNSSFIX, debug=sx.debug, | |||
prefix='libnssfix-', suffix='.so') | |||
umask=os.umask(0o755) | |||
os.chmod(nssfix.name, 0o755&~umask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: There is already a make_executable
function in staticx.utils
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Your new code shouldn't be inside of the existing try
/except KeyError
block.
In CentOS7, pypi latest staticx 0.13.2 build static binary error, requesting execution permission for libnssfix_XXXX.so, fixed now.