From 7b19e81a98b9b81e989feed77becaf0324b801e5 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Mon, 11 Jan 2021 03:43:39 +0000 Subject: [PATCH] finger: Remove '-T' option. This doesn't appear to work against anything, so remove it. Note that das@freebsd.org submitted a nearly identical patch there in 2007 (the patch is nearly identical because it only deletes code/documentation). Signed-off-by: Dan Cross --- usr.bin/finger/extern.h | 1 - usr.bin/finger/finger.1 | 5 +---- usr.bin/finger/finger.c | 7 ++----- usr.bin/finger/net.c | 3 +-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/usr.bin/finger/extern.h b/usr.bin/finger/extern.h index 82212b6996..7cd70c2f62 100644 --- a/usr.bin/finger/extern.h +++ b/usr.bin/finger/extern.h @@ -44,7 +44,6 @@ extern int pplan; extern time_t now; extern int oflag; extern int lflag; -extern int Tflag; extern sa_family_t family; struct utmpentry; diff --git a/usr.bin/finger/finger.1 b/usr.bin/finger/finger.1 index f4b379b0d6..c65d6fb8aa 100644 --- a/usr.bin/finger/finger.1 +++ b/usr.bin/finger/finger.1 @@ -36,7 +36,7 @@ .Nd user information lookup program .Sh SYNOPSIS .Nm -.Op Fl 468glmpshoT +.Op Fl 468glmpsho .Op Ar user ...\& .Op Ar user@host ...\& .Sh DESCRIPTION @@ -161,9 +161,6 @@ option is supplied. All name matching performed by .Nm is case insensitive. -.It Fl T -Disable the piggybacking of data on the initial connection request. -This option is needed to finger hosts with a broken TCP implementation. .El .Pp If no options are specified, diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 5aa1497ef3..87a162f8af 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -77,7 +77,7 @@ DB *db; time_t now; -int entries, gflag, lflag, mflag, pplan, sflag, oflag, Tflag, eightflag; +int entries, gflag, lflag, mflag, pplan, sflag, oflag, eightflag; sa_family_t family = PF_UNSPEC; int d_first = -1; char tbuf[1024]; @@ -94,7 +94,7 @@ option(int argc, char **argv) optind = 1; /* reset getopt */ - while ((ch = getopt(argc, argv, "468glmpshoT")) != -1) + while ((ch = getopt(argc, argv, "468glmpsho")) != -1) switch(ch) { case '4': family = AF_INET; @@ -126,9 +126,6 @@ option(int argc, char **argv) case 'o': oflag = 1; /* office info */ break; - case 'T': - Tflag = 1; /* disable T/TCP */ - break; case '?': default: usage(); diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c index 21ccb55c1a..7d17201f26 100644 --- a/usr.bin/finger/net.c +++ b/usr.bin/finger/net.c @@ -138,8 +138,7 @@ do_protocol(const char *name, const struct addrinfo *ai) * hosts. Also, the implicit-open API is broken on IPv6, so do * the explicit connect there, too. */ - if ((Tflag || ai->ai_addr->sa_family == AF_INET6) - && connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { + if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { warn("connect"); close(s); return -1; -- 2.28.0