Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp553518pxf; Wed, 17 Mar 2021 10:20:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgppQEBAF6JAMC+/FxoKrH0NtiaKJQ0O5gVCORMLaBElt1APUKG/tJc4Qu6Qby6jpTNnl5 X-Received: by 2002:aa7:d3ca:: with SMTP id o10mr22325670edr.374.1616001638542; Wed, 17 Mar 2021 10:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001638; cv=none; d=google.com; s=arc-20160816; b=sKFMjN+UEfu4MMVBG/uk4EckGYGOH409NedPJ5TtfT3jOuINTN99skMIS+8DdBsTqR Qpgt5jOjKM0t9m/HEXpXhiOE6u+FSzw1U/B3/UMMKxwoDJayh5KkxiNXvnEsKqWQFGB7 W2tPLzZE0VbynKUc69er/R6jZvtDTKl7kz2poj1ToCbMX7v1KHUSHWm8W93yIjPMDuIu Iu6Gm8MAGB3CCR7NDnP6vmubxItrCS8qV/MaATaHKntuCNmceTpup4s9pBU3LglUl5r4 knKX8hDJ+t8QZlOzJzW/UocnyYvXuwc4IGP5yqu4OFGsYM3fzAOxzo09zIf1x81+h0d7 3Q4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5yOSfsW07vqRDTUyWiwltNsLbSctUow3AY/lS8mayaU=; b=NX1N9t1z6GZ4ptUxk9ocJX4ybbGbIC8UV/mBAQDoZGA5KBmpoEOA1ymlrA52VWqFpZ fayscoUeYl0Vht5m0KRcLTl4lnHmaw22bGxcxqxALXCfZv4WB/NcO4LwiUu9nIJvZm1U 9C2J03ZVrJZmKYToScHWyUs1vgsNapptQUaEb/KcCBC3npS39s0m58YYaLUEd/Ne9an4 Dh44fd66gs5u3REsZP+EF3Ji90PAP2+u+Oevcme3R6s3TST65HFi5xYa0uegLrMsMx8O WZSfD0g98AvVqhNQsT/BWgPEzvRK01v4LGbG3aaAvqUP9DuoAqEZuDR/919CXUpXnePp /sSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eySEqpnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly21si17707991ejb.128.2021.03.17.10.20.14; Wed, 17 Mar 2021 10:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eySEqpnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbhCQP7Y (ORCPT + 99 others); Wed, 17 Mar 2021 11:59:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22084 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbhCQP6w (ORCPT ); Wed, 17 Mar 2021 11:58:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615996731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5yOSfsW07vqRDTUyWiwltNsLbSctUow3AY/lS8mayaU=; b=eySEqpnxIZ4iVT888VV1NCw0XnHnjLgTZibP2suIsQsn4mzlgwZD1NYsGIBJKUmuS/VF9m KnnJ22rbWznnZBATPDQlIorOFrIWtDAuFwZNGyCIzRwEoJJ8uBwPm+1Gwzhu1mKy3bQ9Fp DYw2X9ubrrxhtaVXj0Aj1ZyrmzXcBCQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-559-uE3gcsSAPJmOrmJR1qXuyg-1; Wed, 17 Mar 2021 11:58:49 -0400 X-MC-Unique: uE3gcsSAPJmOrmJR1qXuyg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02BA08B0AD3; Wed, 17 Mar 2021 15:58:32 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A53EA5D9C0; Wed, 17 Mar 2021 15:58:30 +0000 (UTC) Date: Wed, 17 Mar 2021 11:58:28 -0400 From: Richard Guy Briggs To: Paul Moore Cc: Linux-Audit Mailing List , LKML , Eric Paris Subject: Re: [PATCH 1/2] audit: document /proc/PID/loginuid Message-ID: <20210317155828.GI3141668@madcap2.tricolour.ca> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-12 14:15, Paul Moore wrote: > On Thu, Mar 11, 2021 at 11:41 AM Richard Guy Briggs wrote: > > Describe the /proc/PID/loginuid interface in Documentation/ABI/stable that > > was added 2005-02-01 by commit 1e2d1492e178 ("[PATCH] audit: handle > > loginuid through proc") > > > > Signed-off-by: Richard Guy Briggs > > --- > > Documentation/ABI/stable/procfs-audit_loginuid | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > create mode 100644 Documentation/ABI/stable/procfs-audit_loginuid > > After ~15 years, it might be time ;) > > > diff --git a/Documentation/ABI/stable/procfs-audit_loginuid b/Documentation/ABI/stable/procfs-audit_loginuid > > new file mode 100664 > > index 000000000000..fae63bef2970 > > --- /dev/null > > +++ b/Documentation/ABI/stable/procfs-audit_loginuid > > @@ -0,0 +1,15 @@ > > +What: Audit Login UID > > +Date: 2005-02-01 > > +KernelVersion: 2.6.11-rc2 1e2d1492e178 ("[PATCH] audit: handle loginuid through proc") > > +Contact: linux-audit@redhat.com > > +Format: u32 > > I haven't applied the patch, but I'm going to assume that the "u32" > lines up correctly with the rest of the entries, right? Yes, they do. I'm wondering if they should read instead "%u" since the internal kernel representation isn't as important as what format (number base) is expected and presented. > > +Users: auditd, libaudit, audit-testsuite, login > > I think these entries are a bit too specific as I expect the kernel to > outlive most userspace libraries and applications. I would suggest > "audit and login applications" or something similar. In other examples, users range from a description to an email address, to a URI, to a repository name or address, to a package name, to specific files. I'd prefer to be as specific as reasonably possible without going into gory detail. > > +Description: > > + The /proc/$pid/loginuid pseudofile is written to set and > > I'm really in no position to critique someone's English grammar, but > if we're talking about changes I might add a comma after "set", "... > is written to set, and read to get ...". This would be the Oxford comma debate, and has a sronger preference by USA-ians that Brits. It can help disambiguate meaning in a list of three or more items. > > + read to get the audit login UID of process $pid. If it is > > + unset, permissions are not needed to set it. The accessor must > > + have CAP_AUDIT_CONTROL in the initial user namespace to write > > + it if it has been set. It cannot be written again if > > + AUDIT_FEATURE_LOGINUID_IMMUTABLE is enabled. It cannot be > > + unset if AUDIT_FEATURE_ONLY_UNSET_LOGINUID is enabled. > > paul moore - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635