Skip to content
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

run: Don't inherit LD_PRELOAD/LD_AUDIT from the host #5765

Merged
merged 1 commit into from Apr 24, 2024

Conversation

TingPing
Copy link
Member

@TingPing TingPing commented Apr 4, 2024

I don't think this env var makes much sense to pass into the sandbox for similar reasons to LD_LIBRARY_PATH. Libraries from the host just aren't relevant.

Users can still pass --env=LD_PRELOAD=/foo to use this functionality.

@Erick555
Copy link
Contributor

Erick555 commented Apr 5, 2024

There is a comment below that says:

If updating this list, also update the list in flatpak-run.xml.

It's easy to miss since it's in the middle of the list so perhaps should be moved on top.

@smcv
Copy link
Collaborator

smcv commented Apr 5, 2024

For completeness, we might want to do the same for LD_AUDIT, which is like LD_PRELOAD but more so.

Copy link
Collaborator

@smcv smcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @Erick555 said, please update the documentation to match. Other than that, this LGTM.

Adding LD_AUDIT can be part of this change, or it can be separate.

I would say that changing the organization/layout of this list and its comments as @Erick555 suggested is out-of-scope for this particular PR (but might be a good idea to do separately).

@smcv
Copy link
Collaborator

smcv commented Apr 5, 2024

Users can still pass --env=LD_PRELOAD=/foo to use this functionality.

Did you test this? It would be good to know for sure that it's true.

@TingPing
Copy link
Member Author

TingPing commented Apr 8, 2024

Did you test this? It would be good to know for sure that it's true.

Yes I confirmed it works.

@smcv
Copy link
Collaborator

smcv commented Apr 8, 2024

run: Don't inherhit…

Typo: should say inherit

Copy link
Collaborator

@smcv smcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than the typo

@TingPing TingPing marked this pull request as draft April 8, 2024 13:52
@TingPing
Copy link
Member Author

TingPing commented Apr 8, 2024

Hmm, I actually hit some failures:

error: Can't open generated ld.so.cache

So I'll check this out later.

@TingPing
Copy link
Member Author

TingPing commented Apr 8, 2024

This happens on main, so it must be a badly configured build, but I'll verify everything is good before merging.

@smcv smcv self-requested a review April 8, 2024 14:54
@smcv
Copy link
Collaborator

smcv commented Apr 24, 2024

I'll verify everything is good before merging

Not merging this right now because it's still marked as draft, but the change looks good, so please re-test.

@smcv smcv changed the title run: Don't inherhit LD_PRELOAD from the host run: Don't inherit LD_PRELOAD from the host Apr 24, 2024
@smcv smcv changed the title run: Don't inherit LD_PRELOAD from the host run: Don't inherit LD_PRELOAD/LD_AUDIT from the host Apr 24, 2024
I don't think this env var makes much sense to pass into the sandbox
for similar reasons to LD_LIBRARY_PATH. Libraries from the host
just aren't relevant.

Users can still pass `--env=LD_PRELOAD=/foo` to use this functionality.
@TingPing TingPing marked this pull request as ready for review April 24, 2024 15:03
@TingPing TingPing merged commit abcc001 into main Apr 24, 2024
9 checks passed
@TingPing TingPing deleted the pgriffis/no-ld-preload branch April 24, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants