-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Shared object not found when run through cmd.run #57223
Comments
If I'm removing the:
(thus run as |
I tried to modify the state a little bit for debuging:
|
I found the issue. With "runas"it has "run this as user X" logic which resets the euid and ruid. So it set the ruid and euid correctly, and the egid and group list, just not the rgid but the mismatched rgid is still enough to taint the process. So it looks like the Salt process is tainted as rgid is not equal to egid and this causes $ORIGIN to be ignored. I think Salstack isn't correctly resetting the rgid somewhere ..? (obviously it worked fine from the shell because it's untainted there, so the $ORIGIN lookup works to find the library) |
@silenius thank you for reporting and analyzing the issue. It's not a recipe just one more thing to clear up: as I see from the code there are different paths with or without the |
Hello @DmitryKuzmenko it works if I'm adding a (1) https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run |
Also that issue claims the only documentation change. But I think we have to investigate this behavior at all. |
Description
I have a state with a cmd.run command which fail with:
If I'm running the corresponding command by hand in a shell it works. I'm not sure why the shared object is not found through cmd.run...
The state.show_sls of the corresponding state file is:
Setup
This is with:
( I don't see a DT_FLAGS though. which means that $ORIGIN wouldn't work ...?)
(also it looks like rtld doesn't actually check DT_FLAGS)
Versions Report
This is with:
The text was updated successfully, but these errors were encountered: