From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755509AbaCMTxz (ORCPT ); Thu, 13 Mar 2014 15:53:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752678AbaCMTxx (ORCPT ); Thu, 13 Mar 2014 15:53:53 -0400 Date: Thu, 13 Mar 2014 15:53:49 -0400 From: Vivek Goyal To: Andy Lutomirski Cc: Simo Sorce , "linux-kernel@vger.kernel.org" , cgroups@vger.kernel.org, Network Development , "David S. Miller" , Tejun Heo , jkaluza@redhat.com, lpoetter@redhat.com, kay@redhat.com Subject: Re: [PATCH 2/2] net: Implement SO_PEERCGROUP Message-ID: <20140313195349.GM18914@redhat.com> References: <5320CAEC.6030008@amacapital.net> <1394658983.32465.203.camel@willson.li.ssimo.org> <1394673476.32465.215.camel@willson.li.ssimo.org> <1394675038.32465.223.camel@willson.li.ssimo.org> <1394733077.32465.243.camel@willson.li.ssimo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 13, 2014 at 10:55:16AM -0700, Andy Lutomirski wrote: [..] > >> 2. Docker is a container system, so use the "container" (aka > >> namespace) APIs. There are probably several clever things that could > >> be done with /proc//ns. > > > > pid is racy, if it weren't I would simply go straight > > to /proc//cgroups ... > > How about: > > open("/proc/self/ns/ipc", O_RDONLY); > send the result over SCM_RIGHTS? As I don't know I will ask. So what will server now do with this file descriptor of client's ipc namespace. IOW, what information/identifier does it contain which can be used to map to pre-configrued per container/per namespace policies. Thanks Vivek