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/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=137365 --- Comment #4 from jschauma@netmeister.org --- Briefly looking at https://svnweb.freebsd.org/base/head/usr.bin/last/last.c?revision=351467&view=markup 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 = optarg; + if (!strcmp(file, "-")) { + file = "/dev/stdin"; + } break; case 'h': hostconv(optarg); ``` ...but that's completely untested. (I.e., I don't know whether setutxdb(3) will work correctly with /dev/stdin, and I don't have a FreeBSD system to test right now.) -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-137365-227-ACWNpvSOeU>
