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

LD_PRELOAD is not set in some cases when exec'ing into a container that was started after a scope rule was added #1596

Open
seanvaleo opened this issue Jul 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@seanvaleo
Copy link
Collaborator

Steps To Reproduce

A summary of the problem:

  • edge container: add a scope rule and hit save
  • host: start a new ubuntu container as a daemon with sleep 10000
  • host: exec /bin/bash in the new container
  • env | grep LD_PRELOAD reveals that LD_PRELOAD is not set in the new bash shell
    • mounts are there
    • the library is there

Currently we only support the scenario of starting a container like docker run --rm -it ubuntu /bin/bash and running processes from that bash session.

As a workaround, users can start new containers like: docker run --rm -it -d -e LD_PRELOAD=/opt/appscope/libscope.so ubuntu sleep 10000 (with sleep being an example). If the "new container" is started in this manner, the LD_PRELOAD environment variable will be present even after exec'ing in, in the future.

Environment

- AppScope: 1.4.1
- OS: ubuntu
- Architecture: ARM
- Kernel: ?

Requested priority

None

Relevant log output

No response

@seanvaleo seanvaleo added the bug Something isn't working label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant