Received: by 10.223.185.116 with SMTP id b49csp986321wrg; Wed, 14 Feb 2018 09:50:32 -0800 (PST) X-Google-Smtp-Source: AH8x22686gm3fLaMheSoEjgaCZBAfuzGx9i7nLqpkR/6Ykkrybv9a8Pvlp/PAWynTWDbAheFGYaP X-Received: by 10.99.116.90 with SMTP id e26mr20589pgn.16.1518630632173; Wed, 14 Feb 2018 09:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518630632; cv=none; d=google.com; s=arc-20160816; b=R21+lf+Jc7JDrjSW4oGxa4IFTd9TZeHimYMKhZwCaq3Ru77FsBV5eqcMiipL7wPuHU Nhnauj06gwPnHygzIlPCAijNuNvhrJLjkmXx6HWcdciuwPH316SkQW1m07e32P0llDrp ZUOLci2Al0GWG+mRvucB6KuJATsOSr9TyVYKS5xo+3cv6eN7CW6zGMytfZwtXvXxrTPd bsRZWFUkmagN7WKQENCpFQ0tSa5RgttM9Xn9VFk+TSmemGmJv/OEnxq31KGlVUe3yD9W nCbVHQkhJqOutfBmQcDBfHU6bD7l1KG4dkdRkhYMPrd8vcWTQYNfo9seyu/iWj2k2g6B YPxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=c0H6xFrZ6SLfjq/mtW87NNXxR4G/gOrwUWKF/X9vX+s=; b=HYq/hyv4BUxVtEIcl0doE/UeAeP4fKG7MRigFaMJX226YIIrb0eCPkoHORs6e/YgyF n5GOeXRAFDEQE/zWC7u1Wh/b9YrRygcS1yMgSuCN/jXinl/v48PiQOFJabh46a2jmCy5 R57VlcUg1otDHR/lsSZ8tE2upF7r396umR1f0ToxCI9Eis42cp8aGA3/E+XYxxbmmIDW 8MtSLPP7nj7tiv+gxEX+muI/69IYDTnbdSlyiy5L2cljeIm+w/Ya5QxHFr82XTbNETta xjCa4U8YLltM3CxlsyLqFuNc6gCCh+20aauF96daEggjV0NbveUPMMGfkAEM4vnsFeDF Gufg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si3177103plq.618.2018.02.14.09.50.16; Wed, 14 Feb 2018 09:50:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161494AbeBNRtS (ORCPT + 99 others); Wed, 14 Feb 2018 12:49:18 -0500 Received: from lilium.sigma-star.at ([109.75.188.150]:57324 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161300AbeBNRtR (ORCPT ); Wed, 14 Feb 2018 12:49:17 -0500 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 74DB918181ABF; Wed, 14 Feb 2018 18:49:16 +0100 (CET) From: Richard Weinberger To: Enrico Weigelt Cc: Aleksa Sarai , Linux Containers , "linux-kernel@vger.kernel.org" Subject: Re: plan9 semantics on Linux - mount namespaces Date: Wed, 14 Feb 2018 18:50:29 +0100 Message-ID: <4042675.OEy7g9C5ya@blindfold> In-Reply-To: References: <0f058286-a432-379b-f559-f2fe713807ab@metux.net> <60748622.exvCVAzLTp@blindfold> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 14. Februar 2018, 18:21:12 CET schrieb Enrico Weigelt: > On 14.02.2018 16:17, Richard Weinberger wrote: > > From taking a *very* quick look into busybox source, I suspect this > > should fix> > > it: > > > > diff --git a/util-linux/unshare.c b/util-linux/unshare.c > > index 875e3f86e304..3f59cf4d27c2 100644 > > --- a/util-linux/unshare.c > > +++ b/util-linux/unshare.c > > @@ -350,9 +350,9 @@ int unshare_main(int argc UNUSED_PARAM, char **argv) > > > > * in that user namespace. > > */ > > > > xopen_xwrite_close(PATH_PROC_SETGROUPS, "deny"); > > > > - sprintf(uidmap_buf, "%u 0 1", (unsigned)reuid); > > + sprintf(uidmap_buf, "0 %u 1", (unsigned)reuid); > > > > xopen_xwrite_close(PATH_PROC_UIDMAP, uidmap_buf); > > > > - sprintf(uidmap_buf, "%u 0 1", (unsigned)regid); > > + sprintf(uidmap_buf, "0 %u 1", (unsigned)regid); > > > > xopen_xwrite_close(PATH_PROC_GIDMAP, uidmap_buf); > > > > } else > > if (setgrp_str) { > > hmm, now it works, but only when strace'ing it. > that's really strange. On my box, with my patch applied, also busybox works now. > But still I wonder whether user_ns really solves my problem, as I don't > want to create sandboxed users, but only private namespaces just like > on Plan9. Well, I'd be surprised if that works out of the box. Since you're posting on LKML I assumed you're hacking the kernel to support plan9-alike namespaces... Thanks, //richard -- sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria ATU66964118 - FN 374287y