Project

General

Profile

Submit #3258 ยป 0001-finger-Remove-T-option.patch

dancrossnyc, 01/11/2021 05:28 AM

View differences:

usr.bin/finger/extern.h
44 44
extern time_t now;
45 45
extern int oflag;
46 46
extern int lflag;
47
extern int Tflag;
48 47
extern sa_family_t family;
49 48
struct utmpentry;
50 49

  
usr.bin/finger/finger.1
36 36
.Nd user information lookup program
37 37
.Sh SYNOPSIS
38 38
.Nm
39
.Op Fl 468glmpshoT
39
.Op Fl 468glmpsho
40 40
.Op Ar user ...\&
41 41
.Op Ar user@host ...\&
42 42
.Sh DESCRIPTION
......
161 161
All name matching performed by
162 162
.Nm
163 163
is case insensitive.
164
.It Fl T
165
Disable the piggybacking of data on the initial connection request.
166
This option is needed to finger hosts with a broken TCP implementation.
167 164
.El
168 165
.Pp
169 166
If no options are specified,
usr.bin/finger/finger.c
77 77

  
78 78
DB *db;
79 79
time_t now;
80
int entries, gflag, lflag, mflag, pplan, sflag, oflag, Tflag, eightflag;
80
int entries, gflag, lflag, mflag, pplan, sflag, oflag, eightflag;
81 81
sa_family_t family = PF_UNSPEC;
82 82
int d_first = -1;
83 83
char tbuf[1024];
......
94 94

  
95 95
	optind = 1;		/* reset getopt */
96 96

  
97
	while ((ch = getopt(argc, argv, "468glmpshoT")) != -1)
97
	while ((ch = getopt(argc, argv, "468glmpsho")) != -1)
98 98
		switch(ch) {
99 99
		case '4':
100 100
			family = AF_INET;
......
126 126
		case 'o':
127 127
			oflag = 1;		/* office info */
128 128
			break;
129
		case 'T':
130
			Tflag = 1;		/* disable T/TCP */
131
			break;
132 129
		case '?':
133 130
		default:
134 131
			usage();
usr.bin/finger/net.c
138 138
	 * hosts.  Also, the implicit-open API is broken on IPv6, so do
139 139
	 * the explicit connect there, too.
140 140
	 */
141
	if ((Tflag || ai->ai_addr->sa_family == AF_INET6)
142
	    && connect(s, ai->ai_addr, ai->ai_addrlen) < 0) {
141
	if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) {
143 142
		warn("connect");
144 143
		close(s);
145 144
		return -1;
    (1-1/1)