diff options
author | Mike Gilbert <floppym@gentoo.org> | 2015-07-22 22:34:57 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2015-07-22 22:34:57 -0400 |
commit | 3dce891505f7b2bef4d492203125da765e128b1b (patch) | |
tree | 3076feab4324c7eced7c079f46c7c8078293b08a /src | |
parent | f7d51e1c19aaf26e7b23661d43e71c9e6fcf7adf (diff) |
nspawn: Don't pass uid mount option for devpts
Mounting devpts with a uid breaks pty allocation with recent glibc
versions, which expect that the kernel will set the correct owner for
user-allocated ptys.
The kernel seems to be smart enough to use the correct uid for root when
we switch to a user namespace.
This resolves #337.
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 3428109da4..65b9a5071b 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1785,15 +1785,13 @@ static int setup_pts(const char *dest) { #ifdef HAVE_SELINUX if (arg_selinux_apifs_context) (void) asprintf(&options, - "newinstance,ptmxmode=0666,mode=620,uid=" UID_FMT ",gid=" GID_FMT ",context=\"%s\"", - arg_uid_shift, + "newinstance,ptmxmode=0666,mode=620,gid=" GID_FMT ",context=\"%s\"", arg_uid_shift + TTY_GID, arg_selinux_apifs_context); else #endif (void) asprintf(&options, - "newinstance,ptmxmode=0666,mode=620,uid=" UID_FMT ",gid=" GID_FMT, - arg_uid_shift, + "newinstance,ptmxmode=0666,mode=620,gid=" GID_FMT, arg_uid_shift + TTY_GID); if (!options) |