Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp41620imm; Tue, 24 Jul 2018 13:38:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeuxxajBwd9kTqAVVT7ZymhWp8dp5A8hDn1619Kvz9yUDVyHroga4COZ7Yb5Q5YxYvONV8q X-Received: by 2002:a63:4763:: with SMTP id w35-v6mr17492479pgk.140.1532464698375; Tue, 24 Jul 2018 13:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532464698; cv=none; d=google.com; s=arc-20160816; b=Fzlyy2yB8U2VA7NlgQ/aPf7E8YUXDq2Ke9EZ5rJwx1BjLmplvWpyICL3C24pSQjlaG Lp2kGuuQ5rxKZB0v127b5RDf/O1DRKVgHqPJcJLaegc18O+8s8ilcNhVIYAhRgPui28b eKgw+/gyIRLAZ1MF77a1FlaAKxIWTdt5ya+LWACsH9QZ3zRp3nkSSi64L1VFTPm5pWpy UgDAcKDaADfk0xVebLfK4b75Ft7kdIKeCvErvd1fV5EkFRjd90Ez8mcTj+pcE6nz0991 0CNa7LcnmeAwlYGaElFQqueE2WXlOf53X++FTF3r1uZXK6U/wORwoUaiMbflRv4i0rbY P+0Q== 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 :arc-authentication-results; bh=hIbVHphLjgSJJLxUqiq5n6fMPKzB2BCtuKudKI24qQo=; b=STasaJ6nTyYxky/7DhD94y09EYd2FJcLBny9lU6uDlK/Lnxj5as2s0nxmuHGs7ubRN +dGeC1DoRr3NaEZljYD8lD4alTi+9y4cBidCOFjLLoSOSfuSZ1UwPuAwSjCVYSX/Yvvw oveNPmXQRkJ3IEhsIaDJ/VkmLA6cKDI5Q0uEzmDF7rGPvpJsg2WVuWDQpYpzrdBqtj8q Vm1G4QJ69I7VjH8e5NL7GUe6YlH+oV0aQlRrYmIvg+HOsMdwuUpaJt568we//Bx8hddt MeI1VsNLj9gFR8ilrDE3HCLmQ9EmudOaYP643A8ayQK8PnjTVGdr5lXaibqwqVgCz2TR TrAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Rw7o0o1k; 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 f62-v6si12909669pfg.165.2018.07.24.13.38.02; Tue, 24 Jul 2018 13:38:18 -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=Rw7o0o1k; 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 S2388804AbeGXVpI (ORCPT + 99 others); Tue, 24 Jul 2018 17:45:08 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36472 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388766AbeGXVpH (ORCPT ); Tue, 24 Jul 2018 17:45:07 -0400 Received: by mail-lj1-f194.google.com with SMTP id u7-v6so4759789lji.3 for ; Tue, 24 Jul 2018 13:36:54 -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=hIbVHphLjgSJJLxUqiq5n6fMPKzB2BCtuKudKI24qQo=; b=Rw7o0o1kQNpYMzdrn5M5oShHbXK7UumYZslCkIZc3zlViwoQAaSWrLEgbeqgQ5iY3p w8XLcUGZnnp/wXd6G+rmf6cw/Qsgkjh3AurHIJE094aMkEIjXCAeYGfb/w+/d8YUKt35 qvoxmH4+gs54Grs45jrlGgqTlRA4gXxHVWR6Qiwhxp1jIk3QkeWHpt1whGGaiHkeHwsK E5uFu9uRO4y+Bufj4xZXAaVs5bmxk6B3HFdWH2sX51vkDY7Jh5ocZs8260zD3+KA7QgY VCByExcPN3jGSqYySToot6+DCpTnqmmRWokUff4fIxFEzCXaDo+ZYz2KowuuiP0DY+B7 Yqxw== 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=hIbVHphLjgSJJLxUqiq5n6fMPKzB2BCtuKudKI24qQo=; b=R5m397HdbImssDzTJHnVy/Eilx9B/4Npow5P2oYfV3oSBGO5exmB5JmjlKNprS3YVB QsR5wF+8GR21UzthJhurDt7/VUs9SpnCh81Bp68+jWTDBQkyDtMHD2mcakIe+UVKOg4q QVP1XEleByOWX6G/gAFBx/52WhUUtw355mYEvUerLsw5KQiZ/IpEgyB9++9n9rk3AjXd rTV1UjtfyrRKZvBzgpN67Al77kdQ5iMa6R1BKzag87euz64AVITQJaey9uImW1PBzm+c tZ2EBdw+ZBos64DmKkkMW5lBg9HjdQAZOTP2v7DfipyaThAnh1snj3uz+tMDfe3FoMKG U5+Q== X-Gm-Message-State: AOUpUlFSWk43Qf9GkJYBbTkl29s9dYyynTp/rwyLtMG/+NBx4qranV/a V+kqb954/LyMtDAJ0EqvsMPCjTa9BO07++/ljnKQ X-Received: by 2002:a2e:291c:: with SMTP id u28-v6mr12760409lje.70.1532464614000; Tue, 24 Jul 2018 13:36:54 -0700 (PDT) MIME-Version: 1.0 References: <28ab8ad3c4e5de6f61b928eeb2af030b04a8820b.1528304204.git.rgb@redhat.com> <20180724140721.yyi5e7y3czxsjwug@madcap2.tricolour.ca> In-Reply-To: <20180724140721.yyi5e7y3czxsjwug@madcap2.tricolour.ca> From: Paul Moore Date: Tue, 24 Jul 2018 16:36:42 -0400 Message-ID: Subject: Re: [RFC PATCH ghak90 (was ghak32) V3 05/10] audit: add containerid support for tty_audit To: rgb@redhat.com Cc: cgroups@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, linux-audit@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ebiederm@xmission.com, luto@kernel.org, jlayton@redhat.com, carlos@redhat.com, dhowells@redhat.com, viro@zeniv.linux.org.uk, simo@redhat.com, Eric Paris , serge@hallyn.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 Tue, Jul 24, 2018 at 10:10 AM Richard Guy Briggs wrote: > On 2018-07-20 18:14, Paul Moore wrote: > > On Wed, Jun 6, 2018 at 1:04 PM Richard Guy Briggs wrote: > > > Add audit container identifier auxiliary record to tty logging rule > > > event standalone records. > > > > > > Signed-off-by: Richard Guy Briggs > > > --- > > > drivers/tty/tty_audit.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c > > > index e30aa6b..66bd850 100644 > > > --- a/drivers/tty/tty_audit.c > > > +++ b/drivers/tty/tty_audit.c > > > @@ -66,8 +66,9 @@ static void tty_audit_log(const char *description, dev_t dev, > > > uid_t uid = from_kuid(&init_user_ns, task_uid(tsk)); > > > uid_t loginuid = from_kuid(&init_user_ns, audit_get_loginuid(tsk)); > > > unsigned int sessionid = audit_get_sessionid(tsk); > > > + struct audit_context *context = audit_alloc_local(); > > > > We should be using current's audit_context in tty_audit_log(). > > Actually, we should probably just get rid of the tsk variable in > > tty_audit_log() and use current directly to make things a bit more > > obvious. > > Ok, agreed. At this point, it it current passed in anyways so no harm > other than efficiency. > > >