unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44261@debbugs.gnu.org
Subject: bug#44261: running a daemon with userns in relocateble pack breaks
Date: Fri, 30 Oct 2020 23:05:08 +0100	[thread overview]
Message-ID: <877dr7s73f.fsf@gnu.org> (raw)
In-Reply-To: <871rhfxutl.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 30 Oct 2020 22:33:42 +0100")

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@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




  reply	other threads:[~2020-10-30 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 19:49 bug#44261: running a daemon with userns in relocateble pack breaks Jan Nieuwenhuizen
2020-10-27 20:09 ` Jan Nieuwenhuizen
2020-10-30 21:33   ` Ludovic Courtès
2020-10-30 22:05     ` Jan Nieuwenhuizen [this message]
2020-10-31 22:19       ` Ludovic Courtès
2020-11-01  6:07         ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dr7s73f.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=44261@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).