-
- Downloads
pv-wrap: Try harder to get the initial LD_LIBRARY_PATH into pv-adverb
If bwrap is setuid root, we were previously pushing LD_LIBRARY_PATH
into it via bwrap --setenv, but it turns out that doesn't actually work:
the fact that bwrap is setuid means that the environment variable won't
stick. The result is that pv-adverb doesn't have the host system's glibc
in its library search path and can't start.
We can avoid this problem by using ld.so(8) to invoke pv-adverb with a
specified search path, and then telling pv-adverb to finish setting up
the environment before it runs ldconfig(8) to regenerate the ld.so.cache.
Instead of second-guessing which environment variables glibc is going
to filter out in setuid executables, we just serialize all of them -
with `--env-fd` there's no longer any real reason not to.
Signed-off-by:
Simon McVittie <smcv@collabora.com>
parent
7df35ef3
No related branches found
No related tags found
Showing
- pressure-vessel/bwrap.c 36 additions, 62 deletionspressure-vessel/bwrap.c
- pressure-vessel/bwrap.h 3 additions, 2 deletionspressure-vessel/bwrap.h
- pressure-vessel/runtime.c 40 additions, 1 deletionpressure-vessel/runtime.c
- pressure-vessel/runtime.h 2 additions, 1 deletionpressure-vessel/runtime.h
- pressure-vessel/utils.c 4 additions, 0 deletionspressure-vessel/utils.c
- pressure-vessel/utils.h 3 additions, 0 deletionspressure-vessel/utils.h
- pressure-vessel/wrap.c 24 additions, 10 deletionspressure-vessel/wrap.c
- tests/pressure-vessel/bwrap.c 23 additions, 27 deletionstests/pressure-vessel/bwrap.c
Loading
Please register or sign in to comment