From nobody Mon Dec 02 19:08:38 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y2CxM0Rjyz5gHP2 for ; Mon, 02 Dec 2024 19:08:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y2CxL4rvpz4m4W for ; Mon, 2 Dec 2024 19:08:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733166518; h=from:from:reply-to:subject:subject: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=CRAfkqARH0vORM2ekVaVOugnHd0qCzu1Yj1O4bim/nc=; b=mrDsb88a8IOIKMKZuSFvkTXVzP2WPb0GbVRZHope0miKNFoEk6YApTz2zcjeavawuGcg6+ +F3CgPpXEO8YmjQvqTIbgf3Cv318EBfhvgNKKNtXAQRcGL7apYadAsya18n0EdaTApQOl6 GQoQrYnzIPaFkXOghqW59pISkAJGUmNy4fDHUt+rRNI/yl2qk+1aKKx7Brjl1xddV+Ak5R Efyu6zTqZ0oGB1Nt5Ey1M1a4bT/xQJm2aFPIk/77QjAxEz8AsgIcJKzGpDv+UIpRLTPFxj iMjwHeBZjTA79LA3p8kegQXfFHR0Iv38S6JrMPkznRqqHyjAA8TvUtbX7qbj2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733166518; a=rsa-sha256; cv=none; b=AC8Qn/b+RbN6/CF4Cs0BmPot2hwJH/UWPUaXXifojmVfnNNW8bfPpCCDTMGvZtpfao6n1q 5VF0/ryTKWIbvP1tWQ185Ls0LdtGo95utItj8/epQ1MwA4ONNdIOw3FoLOnD7TNrIyCCEf PlQuAlG1VE1BE1T2ZkB7NJE/NW1vW5OoltdkqqgnZTutRwHX4zn6mYet+UYGHmd/Fi5vFA U2dTQg2amD81GNa137tVIqBV1lWhy2HLZ4QKcl6ASs9x6XXrjwDuP7OZc/9kvtcc6l88AA khCf/N68P/gvKmHs3b+1bMd6vT+iNF5k/w8NRXCwxOgiwvPVwkeCERjptAURlg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y2CxL4KBfzqdk for ; Mon, 2 Dec 2024 19:08:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4B2J8c7i067026 for ; Mon, 2 Dec 2024 19:08:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4B2J8cK8067025 for bugs@FreeBSD.org; Mon, 2 Dec 2024 19:08:38 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 137365] let last(1) read from stdin via "-f -" Date: Mon, 02 Dec 2024 19:08:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 1.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jschauma@netmeister.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D137365 --- Comment #4 from jschauma@netmeister.org --- Briefly looking at https://svnweb.freebsd.org/base/head/usr.bin/last/last.c?revision=3D351467&= view=3Dmarkup a possible fix might be ``` --- last.c.orig 2024-12-02 14:05:22 +++ last.c 2024-12-02 14:06:06 @@ -191,6 +191,9 @@ break; case 'f': file =3D optarg; + if (!strcmp(file, "-")) { + file =3D "/dev/stdin"; + } break; case 'h': hostconv(optarg); ``` ...but that's completely untested. (I.e., I don't=20 know whether setutxdb(3) will work correctly with=20 /dev/stdin, and I don't have a FreeBSD system to test right now.) --=20 You are receiving this mail because: You are the assignee for the bug.=