From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 4B8EE3858C2C for ; Tue, 14 Feb 2023 08:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B8EE3858C2C Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 58E2C3368F for ; Tue, 14 Feb 2023 08:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1676363049; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VC+zmtQdiKDr+Sejzp1kVCA7d9hQjsfzY79tctlyPns=; b=jFrpg9UJMLwfmnXqW4XS39gte96fN4VaELJiUW8JVGmIcn53f2LI6/R3j3nNI/cUWL7zEr VJ9SS4tVLpHLb2S47A7iXU41IP65rJo2Gx9nR32mlgWMEpY3PjkuMc6ccXE+WHQYeHanWO LjP42rjYYDzRAx2hrOroCipS48Eprzc= Received: from kukuk-phex.future.suse.de (unknown [10.162.233.67]) by relay2.suse.de (Postfix) with ESMTP id 4F0BF2C141 for ; Tue, 14 Feb 2023 08:24:09 +0000 (UTC) Received: by kukuk-phex.future.suse.de (Postfix, from userid 358) id 3941860022; Tue, 14 Feb 2023 09:24:09 +0100 (CET) Date: Tue, 14 Feb 2023 09:24:09 +0100 From: Thorsten Kukuk To: libc-alpha@sourceware.org Subject: Re: 64-bit time_t and __WORDSIZE_TIME64_COMPAT32 Message-ID: <20230214082409.GA29974@suse.com> References: <20230208091821.GA2282@suse.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <901005ca-640f-3a8f-a199-c1374f3cf141@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 Wed, Feb 08, Adhemerval Zanella Netto via Libc-alpha wrote: > I proposed a fix for the utmp/utmpx/lastlog interface on the initial 64 bit > time_t support [1] (patch 16 to 22) and Florian suggested to just deprecate > the interface altogether (the DoS BZ#24492 essentially requires rewrite to > use an external daemon, which is not what we want). > > My proposal was essentially to create new path and use 64-bit time_t field, > along with some internal conversions if the old path is used. I ended drop > this part from 64 bit interface because it is a legacy interface and it > would most likely generate some breakage. Thanks for this informations. I agree that utmp/wtmp are legacy and started to collect data, which applications uses utmp/wtmp/btmp/lastlog on a typical openSUSE server installation: https://github.com/thkukuk/utmpx/blob/main/Y2038.md The biggest problem is, there are still quite some tools which modifies utmp/wtmp directly, so that code needs to be rewriten anyways. I think we don't lose anything if btmp and lastlog don't exist anymore. Querying utmp for the runlevel in systemd times is also obsolete. Statistical data how many users are logged in if you login or if you call uptime is also only nice to have, nothing more. So the main consumer of utmp is glibc itself: getlogin()/getlogin_r() Is there any idea how to replace that, if utmp/wtmp gets deprecated? That's the only use case for which I don't see an alternate currently. The musl libc way to use an environment variable is really not safe... Another real usecase is to find the TTYs for wall and wall alike messages by tools like shutdown, systemd and similar. Functions like login()/logout() are only used by openssh. So should be solveable, too. Thorsten > > [1] https://sourceware.org/pipermail/libc-alpha/2021-March/123341.html -- Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg, Germany Managing Director: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman (HRB 36809, AG Nürnberg)