Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4826460imm; Wed, 30 May 2018 12:48:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKInDZDVNlIjZ3PoJtNpU2reWoIOCBroK59kG55fo8EaXW8387CY48ulJq4X3HOtcNiB+gue X-Received: by 2002:a17:902:20e8:: with SMTP id v37-v6mr4049438plg.354.1527709735475; Wed, 30 May 2018 12:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527709735; cv=none; d=google.com; s=arc-20160816; b=ffxtmWQvpZzMA5pVJSNcBQTvFvOyoxsSODGlaBr229fhQ13CC9aacW4xBK4F4HfYML 4oHzM/IL7M8EAoY55ZhK4svtO7jSBFpz/NIaXpctse0+2Ni8aYRARTpTKy9xns9xoWFY F1AS+3TJIrV8MT9uJU5APoQ1G3rco97dhr3QPMlwubHOlYXznMEiPS5Cu9LSRX/hGOE9 KKpxxA21RkGEMbaunC51cCeRO00yxdxoU3ASAFEc7xbgOwXCIh+HJnmyA/AvoTgC2v3p djQCH+UG5q6jBa7CnmnD2aUUQ7I6S/BSF9xxDnZxL3VtAxUawZ7vMQeQAkfCe3mdzVY/ KDNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=o+klVsVQ9SJ0n0vxOXqJymDROWaPSwaBRLX7FRTnPo0=; b=RmAaeb7XD+pDj8uV5k57zvw/cVxFK0zuGj3wE2eufYcW6R67Oxu6UX2Nxhwkw4/Alq x1vspLp/mb0TlKjb7LjjYD45JMFw7V4Sefn68KqjQF5P9cX96hroSTklXzyKZvGaOaZL 4Xa5lsbAaCpBAjiCDhkZ0N9C4LLABVBhoXFW+0pN7b74jKxKizZpuL/GZR01JhFI4Kgw kd/mpkXdvJ5icK86+bxI5pc4TImqjBQIbD5hECZI4oQMJ5OeBjJ0cKYC/D0+1gpKmVF+ /itf8JbVrfJSVebyKen25mCC8EwQyOAc39oUp2NCnM0Vyl1+PeDQ+KvPeKvkWblTjtQD 7KJA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11-v6si17333158plt.39.2018.05.30.12.48.41; Wed, 30 May 2018 12:48:55 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932202AbeE3Tq5 (ORCPT + 99 others); Wed, 30 May 2018 15:46:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32804 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932141AbeE3Tqx (ORCPT ); Wed, 30 May 2018 15:46:53 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4UJhiXF144457 for ; Wed, 30 May 2018 15:46:53 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ja22wguvp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 May 2018 15:46:53 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 May 2018 15:46:52 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 30 May 2018 15:46:50 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4UJknjW14156044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 30 May 2018 19:46:50 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D76F2B2065; Wed, 30 May 2018 16:48:29 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0B48B2064; Wed, 30 May 2018 16:48:29 -0400 (EDT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 May 2018 16:48:29 -0400 (EDT) Subject: Re: [PATCH 3/8] audit: Implement audit_log_tty() To: Paul Moore Cc: zohar@linux.vnet.ibm.com, sgrubb@redhat.com, linux-integrity@vger.kernel.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org References: <20180524201105.3179904-1-stefanb@linux.vnet.ibm.com> <20180524201105.3179904-4-stefanb@linux.vnet.ibm.com> From: Stefan Berger Date: Wed, 30 May 2018 15:46:49 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-MW X-TM-AS-GCONF: 00 x-cbid: 18053019-0052-0000-0000-000002F4DDDB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009099; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000264; SDB=6.01039961; UDB=6.00532309; IPR=6.00819094; MB=3.00021382; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-30 19:46:52 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18053019-0053-0000-0000-00005CD62387 Message-Id: <38d49beb-a5dd-29de-3e4b-3dde67fdc28d@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-30_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805300210 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/29/2018 05:07 PM, Paul Moore wrote: > On Thu, May 24, 2018 at 4:11 PM, Stefan Berger > wrote: >> >> +void audit_log_tty(struct audit_buffer *ab, struct task_struct *tsk) >> +{ >> + struct tty_struct *tty = audit_get_tty(tsk); >> + >> + audit_log_format(ab, " tty=%s", tty ? tty_name(tty) : "(none)"); >> + audit_put_tty(tty); >> +} > Perhaps I missed it, but your IMA patches only ever call this to log > current's tty, yes? If so, I would prefer if we dropped the > task_struct argument and always had audit_log_tty() use current. Done. >