einhorn is vulnerable to environment changes by preloaded code #7

ebroder opened this Issue Jul 10, 2012 · 1 comment


None yet

1 participant

ebroder commented Jul 10, 2012

Classifying this as a bug, which maybe isn't strictly accurate, but it definitely impacted our use of einhorn.

We had an issue today using einhorn's preloading where the preloaded code would modify environment variables in a way that changed einhorn's behavior when it re-exec'd itself on upgrade (specifically, changing RUBYOPT and BUNDLE_GEMFILE).

I think the right thing for einhorn to do in this situation is to save its environment at startup as part of its state and then restore that environment just before it re-exec's itself.

@ebroder ebroder pushed a commit to ebroder/einhorn that referenced this issue Aug 19, 2012
@evan-stripe evan-stripe Store the environment at startup and restore it before reexecing
This makes sure that pre-loaded code isn't able to change the
environment in ways that impact subsequent restarts of einhorn (for
instance by repointing bundler to look at a different Gemfile).

Fixes einhorn issue #7
ebroder commented Oct 14, 2012

This was actually fixed when #9 got merged. Closing

@ebroder ebroder closed this Oct 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment