From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by sourceware.org (Postfix) with ESMTPS id BFBED3858D1E for ; Thu, 13 Jul 2023 16:26:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BFBED3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36DE77LC025630 for ; Thu, 13 Jul 2023 18:26:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=GfxTHzbZALrX0XYWa+bMki56uMinciFszKkKztdQM0U=; b=NJF7owXWNUv+IQAYtZHH8OjL/Zwcb6oiBAWPdp0lpN4Yrbu3lYnkv0OFryTHidgJM/D7 y5j5qV4yQpruAoQr4CvxUQjg43CdHjgcexfDHCxmq91EYojJlHUjr4KTty83fMANJ2ie WFj5u5zLuFVY6WxlVfIJWfYgQvxqTpQln2mUInKKnemlQ526I+OeBqfmvKUfTUMzPkTp 3ZNHdgEt0IFiGnsK7x24Vr/yV9/Z7Crin6JqDpTtuakgw+a4eIX+wGaNN2BCZvUBvdhC N4mRz5stbFUHqMwxZGzlgLFi7rL5GQlXnsp3AN6eJe1kjgcjHCaW35wzI8vBm2yHJmS0 ZQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rtjrc8udq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Jul 2023 18:26:23 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B2E30100056 for ; Thu, 13 Jul 2023 18:26:22 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id ACB6922FA3D for ; Thu, 13 Jul 2023 18:26:22 +0200 (CEST) Received: from [10.252.3.53] (10.252.3.53) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 13 Jul 2023 18:26:23 +0200 Message-ID: Date: Thu, 13 Jul 2023 18:26:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Fix getlogin() to check only stdin to get a valid tty Content-Language: en-US To: References: <1de3b3ee-7dd8-db16-6e17-365dbd9fde84@fibranet.cat> <74633613-8420-5ad6-2882-6ad14066f781@foss.st.com> From: Torbjorn SVENSSON In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.252.3.53] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-13_06,2023-07-13_01,2023-05-22_02 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-07-12 22:06, Brian Inglis wrote: > No worries: Cygwin getlogin/_r is defined as "C" in > winsup/cygwin/uinfo.cc to deal with Windows and limits itself to UNLEN: > /usr/include/cygwin/limits.h:#define __LOGIN_NAME_MAX 256       /* equal > to UNLEN defined in w32api/lmcons.h */ > /usr/include/w32api/lmcons.h:#define UNLEN 256 > Thanks Brian for the clarification!