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 6CEF33858418 for ; Wed, 12 Apr 2023 06:55:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CEF33858418 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 9753E21940 for ; Wed, 12 Apr 2023 06:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1681282501; 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=7eGXdq0dI6e9R14esg0aSmVfn+/IbIuOq587jGXyYac=; b=py2Z5RYtTpc7wzI/0RCnzGtT679ODT9lExSWC182jme7YDR+RdhytbOK1cdqfzQd1BTA4M hRss3rEJSh4Q8cIMvOEIoDctaZJin2B4eBS5dCXYRPVqzW3xNlTnFIHDXuMIiqSH8GpVov vLfWOZEs4K5HjPiFTc6c4hdk7170MJQ= Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8A2EC2C143 for ; Wed, 12 Apr 2023 06:55:01 +0000 (UTC) Received: by wotan.suse.de (Postfix, from userid 358) id 807CE6435; Wed, 12 Apr 2023 06:55:01 +0000 (UTC) Date: Wed, 12 Apr 2023 06:55:01 +0000 From: Thorsten Kukuk To: libc-alpha@sourceware.org Subject: Re: 64-bit time_t and __WORDSIZE_TIME64_COMPAT32 Message-ID: <20230412065501.GA19883@suse.com> References: <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> <99c1f0eb-da72-f760-d200-4318a2da8759@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <99c1f0eb-da72-f760-d200-4318a2da8759@cs.ucla.edu> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 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 Tue, Apr 11, Paul Eggert wrote: > On 4/11/23 04:40, Thorsten Kukuk via Libc-alpha wrote: > > > 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. > > Also, coreutils "who", "users", "pinky", and "uptime", e.g., the shell > command: At least "pinky" does not read wtmp but utmp. For the rest: there are better ways to find out how many users are logged in (utmp) or how many entries wtmp has... I don't understand for what this should be good? It's absolute meaningless how many old records wtmp contains, it depends on when logrotate did the last cleanup... > who /var/log/wtmp That's the equivalent of "last". Since there will be no wtmp anymore, you have to use "last" (gives you the same informations) or we have to implement wtmpdb support into who. Don't know if this makes really sense. > which is used on occasion (e.g., ). > > > > For coreutils patches exist beside who > > points to > which 404s. So I > assume you're talking about > ? These are > proof-of-concept (e.g., "who" needs patching). Correct, things are moving faster than I'm able to update the blog... The patches are WIP in the regard they are tested and working, but since I don't understand how the coreutils configure framework works that is missing. I have already a working "who", I just need some more time for cleanup. I had to work on other tasks first. And since there will be no "utmp" and "wtmp" files anymore, there is no need to support reading them. > Also, will the decision about whether the old or new format is used be > something that the coreutils builder knows at compile time? or will it be > something switchable by the ops staff at runtime, so (e.g.) "who" should be > prepared to read either format? As you can see from the patches it's currently either systemd or utmp/wtmp, not both. libsystemd does not always return an error if systemd-logind is not used (or I haven't found out yet how to test for that, needs more time), so this is hard to decide at runtime. But to be honest: I doubt that people will compile their userland applications with systemd support and use it on systems without systemd: libsystemd does not seem to be designed for that use case, so will create more problems than anything else, should be already the case with other already existing tools, too. Thorsten -- 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)