Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4692803ybg; Mon, 21 Oct 2019 12:56:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy3ob/U8+TmNHRj8hk9Lwsa8jbrBW9RR0E16AbiYoUMc9w2BQ0xWlpe5vuOgbWjt5cZifv X-Received: by 2002:a17:906:46db:: with SMTP id k27mr23815993ejs.308.1571687784306; Mon, 21 Oct 2019 12:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571687784; cv=none; d=google.com; s=arc-20160816; b=L95pLlhgBoJaSKO2Ew3VrLoUgDi7yW+3h3DuTqvXUF4zi+7MwJ3EL1AgoG7oCLdm0n G41+OL36v7PjQ9JVBFR0Iay2KsiYsQ7o5nE72XzEHfPlWx54EJrEaiBhTp5gldYwX6Xv ww6jLmrC4MkebDYA17xfPxIV5k61B6FIkk4aT1W+uNcupDWwaLGQGcWeO5IgnMY3khOu Y1JK3jhf2pS0mnSVjiwiAq3ZTmO8gfFzer5WjrcYkA5vTSEOL5rUJ/XJHNOD0Xqpe0pC uoE3vXuM00lJ06oQgx1xDLMHH105WUcfX91xz0q3VB7s8bVGOkE4sRpZdRh91SSGhIm7 ui7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=B3ZB5cTWc/+E0YKg8QEclL2Ljwj65q5hsf0zgj4Z+rY=; b=lOPC68ZegtYAdqyo/6nbn3ZYEfiIbsR+jf8TPjzWBpraVINjo4AGIjW+J63OCrzwRW TD2+3RgGSV0vc8U61vl9bir9o9Bvwwxl8l6LeEMRrVO/yL09pEWy9WQLV82geQNU9Zfb wd/0R6CkyeoIavkE5pNqLVkUWxyB0eQGaq2ahTtBSez2vHgD2oHCZRDDvSDuuKAytLHL w76fP0ov3nmZDsz1YtbbeyIdkW3uhLHA5My+WcSlvIq8gjH/TGuqt0iEFqtacCRMIbix LGRp+dyKKaZ62HQVyk/HlMCmeTdebHvZpYUukgx018nlNqowFtwnynwNh6Yx2g56/qgM 2ExA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=1U3vsiCG; 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 l2si9130989ejh.389.2019.10.21.12.56.00; Mon, 21 Oct 2019 12:56:24 -0700 (PDT) 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; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=1U3vsiCG; 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 S1730121AbfJUTxe (ORCPT + 99 others); Mon, 21 Oct 2019 15:53:34 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42046 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729388AbfJUTxd (ORCPT ); Mon, 21 Oct 2019 15:53:33 -0400 Received: by mail-lj1-f193.google.com with SMTP id u4so533117ljj.9 for ; Mon, 21 Oct 2019 12:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B3ZB5cTWc/+E0YKg8QEclL2Ljwj65q5hsf0zgj4Z+rY=; b=1U3vsiCGcdSTOTzaQ4vA8rtgFMEgeQgVyd8UdGC3o/CdMtwBWN4F0gK1w2XsWWSBGH YNQV5ahyV/O6yw4h2p7vwNKddLsSKZA8aEdokn0w75hdbMsvb43uRjbJi8H6JHxCG71w Q4NjPgZg63RufqnWqJjnk2UAQF7YnLs+zbq9EPZiF4/9fTsCtv4l9nCyYbMUGLPTXat5 APjvja2QOXD7cHp9B0BCAW/vEBE/sR2BENyelP9rlWUJuII/ey98aimoJiTVDGxwlViu HWB3hhBN5+9iFMdxD2Riji0ncS9ufRQXCLy1K0bA0PdNKWfK7SpaFe+eM4GU9HA2y+6W mAKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B3ZB5cTWc/+E0YKg8QEclL2Ljwj65q5hsf0zgj4Z+rY=; b=qCm7mXfdLmdx+eiY8ItBAtEvAK4hN+v+S2X9KAeHsTLMK62Vw7HmRKBaEofti7pCke KuPE65jIvylybzYVA4XtLoxG3h2+vsfCOHtUAsWXE9Z9n8Mll6EcWStkxVzmv0Ccx1sD PZFCgrMna/NYCcEBg6/Koj1B3pdyUOPq+6VFMdVqhNJYyktzKQAKm8GwGFBPeV+bSC3g N3s98vsys2pM2tcnkRLdGJgPFSSr7RhLJ3YEY8GoBSV64lrBWLqvOeRxebsCyBRyohY0 5LJwT/lyq867pk15uosfqSGMdqOrCZjdd9ZwycPq2dxNrwwxHl/pDiKrISsW+v69DcWS Oilw== X-Gm-Message-State: APjAAAVvz0NkEo/bNEmk2vaCaG5+03bq4WN8PBWW/b2Hf1UtmonRJXq2 UlTuhDhHmiNqgI27s7OwDUVYHKOESbmqqTQrEpSr X-Received: by 2002:a2e:5b82:: with SMTP id m2mr394137lje.184.1571687611172; Mon, 21 Oct 2019 12:53:31 -0700 (PDT) MIME-Version: 1.0 References: <214163d11a75126f610bcedfad67a4d89575dc77.1568834525.git.rgb@redhat.com> <20191019013904.uevmrzbmztsbhpnh@madcap2.tricolour.ca> In-Reply-To: <20191019013904.uevmrzbmztsbhpnh@madcap2.tricolour.ca> From: Paul Moore Date: Mon, 21 Oct 2019 15:53:20 -0400 Message-ID: Subject: Re: [PATCH ghak90 V7 20/21] audit: add capcontid to set contid outside init_user_ns To: Richard Guy Briggs Cc: containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, sgrubb@redhat.com, omosnace@redhat.com, dhowells@redhat.com, simo@redhat.com, Eric Paris , Serge Hallyn , ebiederm@xmission.com, nhorman@tuxdriver.com, Dan Walsh , mpatel@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 18, 2019 at 9:39 PM Richard Guy Briggs wrote: > On 2019-09-18 21:22, Richard Guy Briggs wrote: > > Provide a mechanism similar to CAP_AUDIT_CONTROL to explicitly give a > > process in a non-init user namespace the capability to set audit > > container identifiers. > > > > Use audit netlink message types AUDIT_GET_CAPCONTID 1027 and > > AUDIT_SET_CAPCONTID 1028. The message format includes the data > > structure: > > struct audit_capcontid_status { > > pid_t pid; > > u32 enable; > > }; > > Paul, can I get a review of the general idea here to see if you're ok > with this way of effectively extending CAP_AUDIT_CONTROL for the sake of > setting contid from beyond the init user namespace where capable() can't > reach and ns_capable() is meaningless for these purposes? I think my previous comment about having both the procfs and netlink interfaces apply here. I don't see why we need two different APIs at the start; explain to me why procfs isn't sufficient. If the argument is simply the desire to avoid mounting procfs in the container, how many container orchestrators can function today without a valid /proc? -- paul moore www.paul-moore.com