Date: Mon, 02 Dec 2024 19:08:38 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 137365] let last(1) read from stdin via "-f -" Message-ID: <bug-137365-227-ACWNpvSOeU@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-137365-227@https.bugs.freebsd.org/bugzilla/> References: <bug-137365-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-137365-227-ACWNpvSOeU>