[Pkg-systemd-maintainers] Bug#739593: Bug#739593: Bug#739593: closed by Michael Stapelberg <stapelberg at debian.org> (Re: Bug#739593: systemd makes / shared by default)

Christoph Berg myon at debian.org
Tue Mar 4 22:24:34 GMT 2014


Re: Michael Stapelberg 2014-02-28 <x6iorznpli.fsf at midna.zekjur.net>
> For the people affected by this, please open separate bugs against the
> affected packages to get the software fixed which makes assumptions
> about shared/private-ness that doesn’t necessarily hold. Thanks.

Pardon this question, but how do I do this "mount --make-rprivate /"
in C? I've tried stracing mount:

mount("/dev/mapper/Debian-root", "/", "none", MS_REC|MS_PRIVATE, "errors=remount-ro,discard") = 0

... but every combination of MS_REMOUNT MS_REC MS_PRIVATE I've tried
on / and /proc leaves me with a /proc in the main system that simply
doesn't have any pid dirs.

The program in question is newpid:
https://github.com/ChristophBerg/newpid/blob/master/newpid.c

... with an extra chunk before mount(proc):

        if (mount ("", "/", "", MS_REC|MS_PRIVATE, NULL) != 0) {
                perror ("mount /");
                exit (1);
        }

Am I supposed to parse the current mount flags etc from /proc/mounts
before doing that?

Christoph
-- 
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140304/817de31c/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list