From: Ivan Vilata i Balaguer <ivan@selidor.net>
To: Ivan Vilata i Balaguer <ivan@selidor.net>
Cc: 37967@debbugs.gnu.org
Subject: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd
Date: Sun, 3 Nov 2019 22:23:24 -0500 [thread overview]
Message-ID: <20191104032324.GG17621@sax.terramar.selidor.net> (raw)
In-Reply-To: <20191101151002.GE17621@sax.terramar.selidor.net>
Ivan Vilata i Balaguer (2019-11-01 11:10:02 -0400) wrote:
> Ludovic Courtès (2019-11-01 15:26:27 +0100) wrote:
>
> > […] What about a read-only bind mount like this:
> >
> > unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt
> >
> > ?
>
> This one looks more interesting:
>
> $ unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt && echo ok
> mount: /tmp/tt: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.
> $ echo $?
> 32
BTW, I ran that under strace and it looks like the read-only remount fails
after mounting `/var/run/nscd` in the new namespace has succeeded:
$ strace -f unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt
[…]
access("/run/mount", R_OK|W_OK) = -1 EACCES (Permission denied)
mount("/run/nscd", "/tmp/tt", 0x14c25b0, MS_RDONLY|MS_BIND, NULL) = 0
mount("none", "/tmp/tt", NULL, MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not permitted)
write(2, "mount: ", 7mount: ) = 7
write(2, "/tmp/tt: filesystem was mounted,"..., 89/tmp/tt: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.) = 89
write(2, "\n", 1
[…]
Cheers!
--
Ivan Vilata i Balaguer -- https://elvil.net/
next prev parent reply other threads:[~2019-11-04 3:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 17:27 bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Ivan Vilata i Balaguer
2019-10-29 22:16 ` Ludovic Courtès
2019-10-29 22:47 ` Ivan Vilata i Balaguer
2019-11-01 14:26 ` Ludovic Courtès
2019-11-01 15:10 ` Ivan Vilata i Balaguer
2019-11-04 3:23 ` Ivan Vilata i Balaguer [this message]
2019-11-04 17:07 ` Ludovic Courtès
2019-11-04 21:23 ` Ivan Vilata i Balaguer
2019-11-04 22:37 ` Ludovic Courtès
2019-11-08 19:07 ` Björn Höfling
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=20191104032324.GG17621@sax.terramar.selidor.net \
--to=ivan@selidor.net \
--cc=37967@debbugs.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).