Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934553AbcCNPnB (ORCPT ); Mon, 14 Mar 2016 11:43:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbcCNPm6 (ORCPT ); Mon, 14 Mar 2016 11:42:58 -0400 Message-ID: <1457970175.30497.1.camel@redhat.com> Subject: Re: [PATCH] devpts: Make ptmx be owned by the userns owner instead of userns-local 0 From: Alexander Larsson To: Andy Lutomirski , Linux FS Devel , linux-kernel@vger.kernel.org, "Eric W. Biederman" Cc: gnome-os-list@gnome.org, James Bottomley , mclasen@redhat.com, Linux Containers Date: Mon, 14 Mar 2016 16:42:55 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1338 Lines: 31 On sön, 2016-03-13 at 22:06 -0700, Andy Lutomirski wrote: > We used to have ptmx be owned by the inner uid and gid 0.  Change > this: if the owner and group are both mapped but are not both 0, > then use the owner instead. > > For container-style namespaces (LXC, etc), this should have no > effect -- UID 0 is will either be the owner or will be unmapped. > > The important behavior change is for sandboxes: many sandboxes > intentionally do not create an inner uid 0.  Without this patch, > mounting devpts in such a sandbox is awkward.  With this patch, it > will just work and ptmx will be owned by the namespace owner. > > Cc: Alexander Larsson > Cc: mclasen@redhat.com > Cc: "Eric W. Biederman" > Cc: Linux Containers > Signed-off-by: Andy Lutomirski Tested-by: Alexander Larsson Seems to work fine for me! Thanks! -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson Red Hat, Inc alexl@redhat.com alexander.larsson@gmail.com He's an uncontrollable voodoo librarian with a robot buddy named Sparky. She's a cynical winged journalist from the wrong side of the tracks. They fight crime!