unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] environment: container: Do not remount network files as read-only.
@ 2016-03-17 18:32 Thompson, David
  2016-03-18 20:51 ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Thompson, David @ 2016-03-17 18:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

I noticed that 'guix environment --container --network' didn't work on
an Ubuntu machine I was on, and the culprit was remounting things like
/etc/resolv.conf read-only after the initial bind mount.

What do y'all think?

Thanks,

- Dave

[-- Attachment #2: 0001-environment-container-Do-not-remount-network-files-a.patch --]
[-- Type: text/x-patch, Size: 1629 bytes --]

From 9820a937ef5ab6793f2495a1ce50ff14abb6ec7c Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson@vistahigherlearning.com>
Date: Thu, 17 Mar 2016 14:01:19 -0400
Subject: [PATCH] environment: container: Do not remount network files as
 read-only.

* gnu/scripts/environment.scm (launch-environment/container): Make
  network mappings writable.
---
 guix/scripts/environment.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index b122b4c..896804b 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -391,7 +391,13 @@ host file systems to mount inside the container."
                                             (file-system-mapping
                                              (source file)
                                              (target file)
-                                             (writable? #f))))
+                                             ;; An unpriviliged user might not
+                                             ;; be able to remount
+                                             ;; /etc/resolv.conf as read-only,
+                                             ;; so we say that it is writable
+                                             ;; here, even though in practice
+                                             ;; it is not.
+                                             (writable? #t))))
                                      %network-configuration-files)
                          '())
                      ;; Mappings for the union closure of all inputs.
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-03-28  0:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 18:32 [PATCH] environment: container: Do not remount network files as read-only Thompson, David
2016-03-18 20:51 ` Ludovic Courtès
2016-03-26 14:06   ` Thompson, David
2016-03-26 16:29     ` Drew C
2016-03-26 16:49       ` Thompson, David
2016-03-26 16:59         ` Drew C
2016-03-26 18:43     ` Ludovic Courtès
2016-03-26 18:54       ` Drew C
2016-03-26 19:23       ` Thompson, David
2016-03-27 17:43         ` Ludovic Courtès
2016-03-28  0:32           ` Thompson, David

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).