On Mon, Nov 9, 2020 at 2:36 PM Felix Bier <felix.b...@rohde-schwarz.com> wrote:
>
> This commit saves the file descriptor of /proc/self/{root,cwd}
> before entering into the new mount namespace. When restoring the
> previous mount namespace, it restores /proc/self/{root,cwd}
> based on the saved file descriptors.
>
> Without this change, catalyst cannot be run in a chroot when
> using the recent changes regarding mount namespaces: After the
> mount namespace has been exited, /proc/self/root points to the "/"
> of the host system, not the "/" of the chroot. Therefore, the
> cleanup phase of catalyst runs outside of the chroot.
>
> The code is similar to how nsenter(1) sets root and cwd:
> https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/sys-utils/nsenter.c#n452
>
> Tested in a Gentoo chroot and in Gentoo VM (non-chroot).
>
> Signed-off-by: Felix Bier <felix.b...@rohde-schwarz.com>

Very nice. Thanks a bunch!

I've committed all four patches, but not until I munged them: I
stripped out all the headers except From/Date/Subject (and modified
subject to remove [gentoo-catalyst], etc; then ran base64 -d on the
body. Only then could I get the patches to apply. I really don't
understand why. I've never had to do this before. Maybe you're sending
the patches from a branch with a bunch of other work on it?

I'd suggest making a fresh clone of catalyst and trying to apply the
patches yourself to see if you can determine what's going on.

Reply via email to