SUID not working with pyinstaller-derived binaries? #5539
Answered
by
rokm
Fairlight2cx
asked this question in
Help
-
I just created a binary with pyinstaller. The program in question is not reading as UID 0 via os.getuid() or os.geteuid(), despite the fact it is 4711 root:root. Is there a way to get the resultant binaries to honour their SUID bit? They execute, but the SUID bit appears to be being dropped on the floor. Yet...they're not scripts. I use StaticPerl for this all the time for Perl. I have to believe pyinstaller can do it for Python. A tiny bit of help, please? |
Beta Was this translation helpful? Give feedback.
Answered by
rokm
Feb 8, 2021
Replies: 1 comment 1 reply
-
Seems to work for me: # program.py
import os
print(f"UID: {os.getuid()}")
print(f"EUID: {os.geteuid()}")
(Same for |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Legorooj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems to work for me: