unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Make sure /dev/pts/ptmx is world-writable
@ 2014-04-02 21:41 Ludovic Courtès
  2014-04-03  6:53 ` Lluís Batlle i Rossell
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-02 21:41 UTC (permalink / raw)
  To: nix-dev; +Cc: guix-devel

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

Hello,

While running Python 3’s test suite, we noticed that on some systems
/dev/pts/ptmx is created with permissions 0 (that’s the case with my
Nixpkgs-originating 3.0.43 kernel, but someone with a Debian-originating
3.10-3 reported not having this problem.)

There’s still the problem that people without
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y are screwed (as noted in build.cc),
but I don’t see how we could work around it.

Thoughts?

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 707 bytes --]

diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index e846995..53a92c1 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2079,6 +2079,10 @@ void DerivationGoal::initChild()
                 if (mount("none", (chrootRootDir + "/dev/pts").c_str(), "devpts", 0, "newinstance,mode=0620") == -1)
                     throw SysError("mounting /dev/pts");
                 createSymlink("/dev/pts/ptmx", chrootRootDir + "/dev/ptmx");
+
+		/* Make sure /dev/pts/ptmx is world-writable.  With some
+		   Linux versions, it is created with permissions 0.  */
+		chmod_(chrootRootDir + "/dev/pts/ptmx", 0666);
             }
 
             /* Do the chroot().  Below we do a chdir() to the

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

end of thread, other threads:[~2014-04-03 10:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-02 21:41 [PATCH] Make sure /dev/pts/ptmx is world-writable Ludovic Courtès
2014-04-03  6:53 ` Lluís Batlle i Rossell
2014-04-03  7:28   ` Ludovic Courtès
2014-04-03  7:31   ` Ludovic Courtès
2014-04-03 10:38     ` Lluís Batlle i Rossell

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