OpenBSD CVS

CVS log for src/usr.bin/telnet/main.c


[BACK] Up to [local] / src / usr.bin / telnet

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:49 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.36: +1 -2 lines
Diff to previous 1.36 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Dec 6 12:00:16 2015 UTC (8 years, 5 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.35: +3 -5 lines
Diff to previous 1.35 (colored)

Use __progname instead of manually handling argv[0].

ok deraadt, mmcc, tedu

Revision 1.35 / (download) - annotate - [select for diffs], Thu Nov 19 22:01:33 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

how did the pledge "dns" get forgotten?!?! wow..

Revision 1.34 / (download) - annotate - [select for diffs], Fri Nov 13 18:05:37 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)

move pledge(2) after setrtable(2), like in nc(1);
OK deraadt@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 13 17:13:59 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.32: +6 -1 lines
Diff to previous 1.32 (colored)

pledge "stdio rpath wpath getpw inet tty" at startup.   After opening
the socket and entering the main loop, pledge "stdio tty".

For my next trick, I will be adding chacha20-poly1305 support.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Nov 13 17:04:48 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +7 -1 lines
Diff to previous 1.31 (colored)

Use setrtable() for the entire process, rather than doing it for the
socket later.  Same idea as in nc(1).

Revision 1.31 / (download) - annotate - [select for diffs], Fri Nov 13 17:01:12 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +3 -6 lines
Diff to previous 1.30 (colored)

Remove support for the debug command; noone needs setsockopt SO_DEBUG

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jul 22 07:30:24 2014 UTC (9 years, 10 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.29: +5 -7 lines
Diff to previous 1.29 (colored)

use ansi style function declarations
with suggestions from and ok guenther@

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jul 20 11:20:52 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Fix array overflow in command line handling

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jul 20 10:32:23 2014 UTC (9 years, 10 months ago) by jsg
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

use NULL instead of 0 when dealing with pointers
ok guenther@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jul 20 10:18:10 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.26: +3 -4 lines
Diff to previous 1.26 (colored)

Kill lint comments; mark ExitString() as __dead

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jul 20 08:12:45 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

More encryption tentacles: intr_happened and intr_waiting vanish
Push more includes into .c files
Make ring.c only need ring.h

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 20 06:39:41 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.24: +2 -5 lines
Diff to previous 1.24 (colored)

Correctly cast to unsigned char for ctype functions/macros
Push <ctype.h> and <unistd.h> into the .c files

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 20 05:22:02 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.23: +1 -3 lines
Diff to previous 1.23 (colored)

Simplify #includes, start pushing them into the .c files, eliminate
extern declarations from .c files that duplicate those in .h files,
start marking functions with __dead

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 19 23:50:38 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.22: +24 -222 lines
Diff to previous 1.22 (colored)

Flense the telnet code base of unwanted ifdefs: authentication/encryption
tn3270, sgtty, pre-POSIX and other ancient system support, etc.  Brings up
to date the manpage with what we support.

ok matthieu@ beck@ jmc@ millert@ deraadt@ okan@

Revision 1.22 / (download) - annotate - [select for diffs], Sat Oct 26 21:33:29 2013 UTC (10 years, 6 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.21: +3 -4 lines
Diff to previous 1.21 (colored)

Only use setsockopt(..SO_RTABLE..) if the -V flag is given to nc/telnet,
same style as traceroute6 (change to int and use -1 as a flag, so rtable 0
can still be used as an explicit parameter).

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 21 09:12:55 2013 UTC (10 years, 7 months ago) by phessler
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Oups, a little bit overzealous.  If we "route -T4 exec telnet foo", then
make sure telnet runs in rdomain 4 as expected.  Same for nc.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jul 3 04:44:51 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.19: +6 -6 lines
Diff to previous 1.19 (colored)

Fix the naming of interfaces and variables for rdomains and rtables
and make it possible to bind sockets (including listening sockets!)
to rtables and not just rdomains.  This changes the name of the
system calls, socket option, and ioctl.  After building with this
you should remove the files /usr/share/man/cat2/[gs]etrdomain.0.

Since this removes the existing [gs]etrdomain() system calls, the
libc major is bumped.

Written by claudio@, criticized^Wcritiqued by me

Revision 1.19 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:44 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.18: +1 -7 lines
Diff to previous 1.18 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 6 22:51:52 2009 UTC (14 years, 9 months ago) by sobrado
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

fix typo in argument name for a recently added option.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jun 5 00:20:46 2009 UTC (14 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.16: +15 -3 lines
Diff to previous 1.16 (colored)

Last but not least. Telnet -V rdomain to connect to systems in other routing
domains.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 15 22:51:16 2007 UTC (17 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.15: +11 -22 lines
Diff to previous 1.15 (colored)

telnet.1: sort options; from Igor Sobrado

main.c: whack most of usage(), and have different usage() depending
whether this is invoked as telnet or tn3270;
help otto; ok millert

Revision 1.15 / (download) - annotate - [select for diffs], Sun Dec 28 21:53:01 2003 UTC (20 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.14: +18 -9 lines
Diff to previous 1.14 (colored)

Introduce -4 and -6: options to force usage of IPv4 or IPv6 only.
From PR 1974.

ok henning@ jose@

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:18 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.13: +2 -6 lines
Diff to previous 1.13 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Mar 22 13:49:28 2002 UTC (22 years, 2 months ago) by hin
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +6 -4 lines
Diff to previous 1.12 (colored)

Telnet encryption warning messages, taken from kth-krb4-1.1.1.

(krb4-1.1.1 will be imported after release)

Noone bothered to look at this, but I've used this for a couple of weeks,
and i really want this to go in before release.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Nov 3 00:07:53 2001 UTC (22 years, 6 months ago) by hin
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

Telnet client shouldn't say it does Kerberos unless there actually exists
a krb4 or krb5 ticket file.
ok art@

Revision 1.11 / (download) - annotate - [select for diffs], Fri May 25 10:24:25 2001 UTC (23 years ago) by hin
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.10: +60 -19 lines
Diff to previous 1.10 (colored)

KerberosV support from Heimdal.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 21 22:46:37 2001 UTC (23 years, 4 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

oflow fix in rev 1.8 was wrong; mjl@netbsd.org

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 15 11:16:31 1999 UTC (24 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.8: +6 -8 lines
Diff to previous 1.8 (colored)

usage cleanup

Revision 1.8 / (download) - annotate - [select for diffs], Mon Dec 6 00:31:55 1999 UTC (24 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

oflow

Revision 1.7 / (download) - annotate - [select for diffs], Fri May 15 03:16:38 1998 UTC (26 years ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

cleanup warnings.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 7 20:01:10 1998 UTC (26 years, 1 month ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.5: +20 -11 lines
Diff to previous 1.5 (colored)

 - show usage for the encrypt command when there are no arguments.
 - don't default to autologin and autoencrypt when kerberos is disabled.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 12 04:57:35 1998 UTC (26 years, 2 months ago) by art
Branch: MAIN
Changes since 1.4: +53 -24 lines
Diff to previous 1.4 (colored)

encryption support from kth-krb 0.9.8 (kerberos only)
plus some tweaks for better binary/8-bit support.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 15 23:43:20 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jul 3 14:01:56 1996 UTC (27 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +14 -7 lines
Diff to previous 1.2 (colored)

Add a -b option that takes a hostname or IP-address as an argument.
This address is bound to the local socket of the TCP connection and is
useful for talking to services which does authentication based on IP-
addresses.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Mar 27 19:33:03 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.1: +27 -20 lines
Diff to previous 1.1 (colored)

From NetBSD: merge of 960317

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:14 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:46:14 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.