Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2120558pxa; Mon, 24 Aug 2020 05:56:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZRcsNSDbBjN3E3zYk4RsxmTIBaMvyx6NGM7ZiMozbkCxG8lN2RzUV34zcSEdi4CDS3Oiw X-Received: by 2002:a17:906:698:: with SMTP id u24mr5244587ejb.57.1598273773786; Mon, 24 Aug 2020 05:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598273773; cv=none; d=google.com; s=arc-20160816; b=jX6ZxYfm1MWX+t8I9UCk9s5v9cus7CH1Lmmp/Kel6B5Vzz9jEYplzoEgR4ls3Z1cOK z4stoNWASns4At57ds/VruNPw8eMh/EXMWWw0LQ+9uiIiak9d1Z4+5u4N8nO/GwedBey emEeQ1xxj+oeIIb81HAHCFBkJP1KPAW8BSjnCcEUpGgJKSd2m/+HH/pDFl0kf5hfsG+v h2GXEEz9BIR/pYm1wEuFV3ictbt6WnwmdckVEjYud+AV9UnHNQwB3LLoaIRlqQgOHcTU bOLSJzMsgqcQ673vIm5iwH+zT9+/lGnlbXKwqppmgmsx90qqgjlkqgh9bwSaF3t6pW6O HxcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=SfkQJO0WX7QYvcvwyypgBXvjdOGetP3yae225kbDPA0=; b=i3bJx1NGZMCEZy4f2UG9HQkp2UNy6qacx8mTC3K9JH0nQENFIy4WeLHIKjS2x3z4Nv hN94ssyDzH/UeBl06P5FleiDrFEmDPEBoZ0Q+Tluzmg/xpQT5kuy3yh57LvGxh+z0fIm Bmxf2r2C45FGQCNhhjbwGkTmRv5Rv0xXGnxAPLhF/OpZvCLF8k+lA9f8VrTW5jyLtyIc LSiptfd4ogG5e5EtvSv/G9vNOExEABHNVbfz1woYy6jUT7ozJikAscDVHWitKqI5pDNK rP6RnEwVNEN1ovk0CbVAcGoJyFt+YbbjF2+iW3IwzNqFE4BYNmVG4YoMOhmKxbjTf31L XFvw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 30si2506315edq.331.2020.08.24.05.55.50; Mon, 24 Aug 2020 05:56:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbgHXMyx (ORCPT + 99 others); Mon, 24 Aug 2020 08:54:53 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38061 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHXMyw (ORCPT ); Mon, 24 Aug 2020 08:54:52 -0400 Received: by mail-lf1-f65.google.com with SMTP id k10so1434336lfm.5; Mon, 24 Aug 2020 05:54:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SfkQJO0WX7QYvcvwyypgBXvjdOGetP3yae225kbDPA0=; b=OjwtheQlj2je4vqPGpUnKbo8Nk9Er2JZnzMOQPWbAYMaHqsHzkb/rhZYKzsybwKj9I HfncScfOwRDOyYELReLPAF3TmWYUAD+ZPbubTe9c/UPN9GthSxPpapZyTN5Lr3E326WX hDdj2SBaufTdIFkSD+8sXifnDU+hlL/C4/ujHQtermMKju2eDvpm6Q2Mhm66t94xMoAK mW9AfLjj5cECSlwayNI9XBTI2hV61QjAa4m4RFgldOS45VsMhFg0KvQfhytQAtc8UOyo Bj4VzJxmKw5ESGyOp1GdBNvQsA7xUH3xAY8XcwbGqLr+5ovieR6/ZMfZQ4CoUkGC304y p8QA== X-Gm-Message-State: AOAM533cYqJgJzmlqbPsDdcVeNHPjakK8W2aCaCHEwtykTFUB2xCqY8B SLfckJv8xGFFnlME5TEtfig= X-Received: by 2002:a19:4290:: with SMTP id p138mr1743951lfa.187.1598273689854; Mon, 24 Aug 2020 05:54:49 -0700 (PDT) Received: from localhost.localdomain ([213.87.147.111]) by smtp.googlemail.com with ESMTPSA id e17sm2177112ljg.85.2020.08.24.05.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 05:54:49 -0700 (PDT) From: Denis Efremov Cc: Denis Efremov , James Morris , "Serge E. Hallyn" , Lakshmi Ramasubramanian , Mimi Zohar , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] integrity: Use current_uid() in integrity_audit_message() Date: Mon, 24 Aug 2020 15:54:35 +0300 Message-Id: <20200824125435.487194-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modify integrity_audit_message() to use current_uid(). Signed-off-by: Denis Efremov --- security/integrity/integrity_audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/integrity_audit.c b/security/integrity/integrity_audit.c index f25e7df099c8..29220056207f 100644 --- a/security/integrity/integrity_audit.c +++ b/security/integrity/integrity_audit.c @@ -47,7 +47,7 @@ void integrity_audit_message(int audit_msgno, struct inode *inode, ab = audit_log_start(audit_context(), GFP_KERNEL, audit_msgno); audit_log_format(ab, "pid=%d uid=%u auid=%u ses=%u", task_pid_nr(current), - from_kuid(&init_user_ns, current_cred()->uid), + from_kuid(&init_user_ns, current_uid()), from_kuid(&init_user_ns, audit_get_loginuid(current)), audit_get_sessionid(current)); audit_log_task_context(ab); -- 2.26.2