cyphar / remainroot

A set of shims to allow unmodified programs to run nicely in rootless containers.
GNU General Public License v3.0
31 stars 3 forks source link

apt-get #3

Open utaal opened 7 years ago

utaal commented 7 years ago

Hi, saw your talk and read your blogpost(s) on rootless containers. Thanks for the great work!

Is remainroot apt-get update still expected to fail?

AkihiroSuda commented 7 years ago

ping @cyphar

I couldn't get neither apt nor yum to work.

Ubuntu 16.04 apt:

# apt-get update
Reading package lists... Done
W: chown to _apt:root of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (22: Invalid argument)
E: Method gave invalid 400 URI Failure message: Failed to setgroups - setgroups (1: Operation not permitted)
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (112)

CentOS 7 yum:

# yum install gcc
...
Installed size: 54 M
Is this ok [y/d/N]: y
Downloading packages:
[E:remainroot] ohm_search(28) failed on traced pid
cyphar commented 7 years ago

apt fails because something odd is going on with how it's forking, I wasn't able to figure it out and haven't worked on this project much recently. I'm not sure why yum is failing but the error looks like the PID somehow got intercepted before we registered it as a child? I remember that I'd written down a bunch of theoretical race conditions in our tracing code and that it would be easier to rewrite it in Rust.

Maybe I should get around to doing that, since we no longer need an LD_PRELOAD build.