From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 85AE13858D20 for ; Tue, 11 Apr 2023 13:23:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 85AE13858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x22c.google.com with SMTP id z16so5043934oib.9 for ; Tue, 11 Apr 2023 06:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681219432; x=1683811432; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=qTo1ijkghd/Tm9rINM1GB5kQnzwJ+LzbF93Mrhyox7s=; b=AzVCJCq1sAKbB+seGCZcePS9959NHfhaH4qsEXya8HMHM0zp/BbCkXHravfN+UQLwT Cb5upFxd9IRF2h2vXZILr32tRVmmGejVz70BMrZRW5RF1waF8CaxvmxZpWudz7u0zUml bemMksVSKZo/62xUWx4dk/7hKqRYswnsgRIImb2blSoeoJucHcO2EMmsCnd/aegKGJEt ABYZBb8afTkzHj6wueEtWFVOzqx2EZDWMv84U7s4qWCu9KKp+vbnb755UD1XPOwWgJMH ox27SDdL0D/trhK8ViZ+QmtU7SwuvquVriOsuTyslSRMwGYmdImfnAuJ1yA5Ws4ojNUk K9tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681219432; x=1683811432; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qTo1ijkghd/Tm9rINM1GB5kQnzwJ+LzbF93Mrhyox7s=; b=D33YAAVDF/yti0G9XVekNc8py/YBqWE4Nq0LgMBWCahZr5l/UjB6Cbwd9QmMHUTWNm DE0x5EyD6I+V252HxOpwSYYjwJzx8e1vCERs8TPjDt9K2VmSOlZhxG+QIF6koqFHZ+5m K5jPDQ3FB2dVOTe58kOFluqzO4DvDtbNUm7chIAkqB3AAg3mA/fRtAuA6dpI2OfG8w3c 9UXYhCY+OLHYTLEwvX1Qckt+2gb9jmPq25GKCtZ1yb+Bk6BQcwT65oKBEgJ+NX19LkKV MDX3TsH2VvfitoErkuqBIbAoSLDrPf5srX34uvXU51roQeer+l8KGiYLAbb+eWjQVdNl XYow== X-Gm-Message-State: AAQBX9dR8wQCxvWcY/geuz4QCNOYgRG1WduVuZ+IPjh2krbL++1XvGBx KxMVgjag9e5QAbo6c+uJR1xPQ3b9fJb/Efx4dvWHSg== X-Google-Smtp-Source: AKy350ZWOVRpyJmCiCwUCJqoi0rwrcz42iietXN3YhoXS0PbJX/6a5SnntpbH0Umvm39m8j7kU6dMw== X-Received: by 2002:a05:6808:23c9:b0:38a:f7f6:f4cd with SMTP id bq9-20020a05680823c900b0038af7f6f4cdmr7526823oib.55.1681219432166; Tue, 11 Apr 2023 06:23:52 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:55a1:1474:97d8:bf65:d9d0? ([2804:1b3:a7c2:55a1:1474:97d8:bf65:d9d0]) by smtp.gmail.com with ESMTPSA id en12-20020a056808394c00b003898ebb8be0sm5477639oib.48.2023.04.11.06.23.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 06:23:51 -0700 (PDT) Message-ID: <8984748c-84f0-1ff7-77a5-ed0d1f372b86@linaro.org> Date: Tue, 11 Apr 2023 10:23:48 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: 64-bit time_t and __WORDSIZE_TIME64_COMPAT32 Content-Language: en-US To: libc-alpha@sourceware.org, Thorsten Kukuk References: <0869a6f98f29405eb431f63db593c490@DB6PR04MB3255.eurprd04.prod.outlook.com> <20230208101125.GA5099@suse.com> <20230208102225.GA5543@suse.com> <7485b79473614eaa994d3ea79c91629a@DB6PR04MB3255.eurprd04.prod.outlook.com> <20230208103819.GA6177@suse.com> <901005ca-640f-3a8f-a199-c1374f3cf141@linaro.org> <20230214082409.GA29974@suse.com> <3230d2f8fa214c268cba52e699c14ae2@DB6PR04MB3255.eurprd04.prod.outlook.com> <20230216135920.GA1706@suse.com> <20230411114052.GA29920@suse.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20230411114052.GA29920@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 11/04/23 08:40, Thorsten Kukuk via Libc-alpha wrote: > > Hi, > > to give a short update on this: > > lastlog: see https://www.thkukuk.de/blog/Y2038_glibc_lastlog_64bit/ > > openSUSE Tumbleweed and MicroOS use already lastlog2, we are starting now > to remove the "old" lastlog code and usage. ALP is currently switching > to it. > > > wtmp: see https://www.thkukuk.de/blog/Y2038_glibc_wtmp_64bit/ > > Even if many applications write wtmp entries in a chaotic or wrong way, > there is only one application from relevance reading it: last. > lslogins reads it, too, don't know how often it is really used. adjtimex > reads it, too, but I haven't found any application writing this type of > entries adjtimex tries to read. > > wtmpdb is currently in security review, afterwards we will switch to it, > too. Everything is already prepared for this. > > > utmp: see https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/ > > systemd accepted the necessary patches, v254 should contain them. First > upstream projects accepted the necessary adjustements, too. > Main usage of utmp is to find out how many users are logged in, else > there are wall, write, who and w. > For coreutils patches exist beside who, procps accepted already the > first bunch, util-linux has open PRs for the next release, Linux-PAM > accpeted them, too. Will be in the next release the coming days. > > Only problem is openssh, since they know the TTY only after PAM > authentication and systemd-logind has no interface to adjust the TTY > later. I will look into this next. > > So from my point of view, dropping lastlog and wtmp should be straight > forward, utmp will need quite some more work. Thanks for the follow up, it seems these interface are either legacy or they are not really meant to be on libc (as musl did). Moving out to use systemd or an external isolated process along with some IPC is indeed way better approach. I wonder if it would be better as a long term to add a switch --disable-utmp (similar to --disable-crypt) which just set these functions to return ENOSYS without any compatibility support. It is highly unlike that we will ever get a proper fix for BZ#24492 [1] or add support for 64-bit time_t for these interface, which are both either security or usability issues. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24492