GNU bug report logs -
#44261
running a daemon with userns in relocateble pack breaks
Previous Next
Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Tue, 27 Oct 2020 19:50:01 UTC
Severity: important
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Ludovic Courtès writes:
Hi!
> As discussed on IRC, my initial advice about MS_PRIVATE was misguided.
> The real issue is the “rm_rf (new_root);” call, which removes the root
> directory and thus leaves child processes (the daemon) with nothing.
Yes, I'm not entirely sure what I thought to see yesterday; anyway the
rm_rf (new_root) is indeed the thing that makes the daemon crash.
> The attached patch adds a test loosely based on yours and a fix for
> that. The fix (for the “userns” engine) is to make NEW_ROOT a tmpfs,
> such that upon completion, all we need to do is to unmount it and remove
> it; it lives on as the root file system of child processes.
>
> In the “fakechroot” case, we have to leave NEW_ROOT behind, which is not
> great but acceptable (it’s user-owned, #o700, and it’s under /tmp). The
> test only checks the “userns” engine.
Yes, I think this is acceptable.
> If you confirm that it works for you and looks reasonable, we can apply
> it.
Yes, this works. The test and also my reproducer now work fine.
Thanks a lot!
Janneke
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 4 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.