OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.46 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:12 2023 UTC (14 months, 1 week ago) by guenther
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.45: +1 -10 lines
Diff to previous 1.45 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.45 / (download) - annotate - [select for diffs], Tue Oct 4 08:03:26 2022 UTC (19 months, 2 weeks ago) by kn
Branch: MAIN
Changes since 1.44: +18 -35 lines
Diff to previous 1.44 (colored)

Sort commands in help output, add help to manual

OK millert
Feedback OK jmc

Revision 1.44 / (download) - annotate - [select for diffs], Tue Oct 4 07:03:27 2022 UTC (19 months, 2 weeks ago) by kn
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

Only print prompt in interactive usage

Scripting tftp(1) makes it non-interactive, yet the prompt is still
printed and may mess up the shell's PS1:
	$ echo put nonexistent | tftp localhost
	tftp> tftp: open: nonexistent: No such file or directory
	tftp> $

The fix seems easy and works as expected for multiple commands as well:
	$ echo 'verbose\nput nonexistent' | ./obj/tftp localhost
	Verbose mode on.
	tftp: open: nonexistent: No such file or directory
	$

OK millert

Revision 1.43 / (download) - annotate - [select for diffs], Thu Sep 20 11:42:42 2018 UTC (5 years, 7 months ago) by jsg
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
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

fix indentation
ok krw@ millert@

Revision 1.42 / (download) - annotate - [select for diffs], Thu Apr 26 12:42:51 2018 UTC (6 years ago) by guenther
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jan 21 11:32:04 2017 UTC (7 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.40: +2 -3 lines
Diff to previous 1.40 (colored)

The POSIX APIs that that sockaddrs all ignore the s*_len field in the
incoming socket, so userspace doesn't need to set it unless it has its
own reasons for tracking the size along with the sockaddr.

ok phessler@ deraadt@ florian@

Revision 1.40 / (download) - annotate - [select for diffs], Wed Mar 16 15:41:11 2016 UTC (8 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

More "(<blah> *)0" -> NULL, avoiding any stdarg functions.

Feedback millert@ kettenis@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 11 01:12:10 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

creat() -> open equiv; from Frederic Nowak

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 18 03:54:22 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Add "dns" to the pledges.  Previously these worked because of "inet",
alas "dns" is now a mandatory statement if you want to do dns!

Revision 1.37 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:09 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.36 / (download) - annotate - [select for diffs], Wed Oct 7 14:36:07 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +4 -1 lines
Diff to previous 1.35 (colored)

tame "stdio inet rpath wpath cpath" supports all the functions of tftp.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:13 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.34 / (download) - annotate - [select for diffs], Tue Nov 26 21:08:12 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

unsigned char casts for ctype
ok okan

Revision 1.33 / (download) - annotate - [select for diffs], Mon May 21 13:14:30 2012 UTC (12 years ago) by gsoares
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
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

fix put usage

ok sthen@ henning@ dlg@
"looks right" deraadt@

Revision 1.32 / (download) - annotate - [select for diffs], Wed May 2 13:41:15 2012 UTC (12 years ago) by gsoares
Branch: MAIN
Changes since 1.31: +4 -5 lines
Diff to previous 1.31 (colored)

strncpy() -> strlcpy()

ok henning@

Revision 1.31 / (download) - annotate - [select for diffs], Tue May 1 04:23:21 2012 UTC (12 years ago) by gsoares
Branch: MAIN
Changes since 1.30: +92 -77 lines
Diff to previous 1.30 (colored)

IPv6 support; mostly a sync with netbsd code done by itojun@

tweaks/OK henning@ sthen@ jmc@ jasper@

feedback/tests weerd@ brad@ (thanks)

Revision 1.30 / (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_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, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.29: +1 -15 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Fri May 11 01:47:48 2007 UTC (17 years ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, 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.28: +11 -3 lines
Diff to previous 1.28 (colored)

Delinting from tbert <bret dot lambert at gmail dot com>

OK moritz@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 26 22:43:53 2006 UTC (17 years, 9 months ago) by mglocker
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.27: +6 -6 lines
Diff to previous 1.27 (colored)

Make tftp atoi() free.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jul 26 09:10:03 2006 UTC (17 years, 9 months ago) by mglocker
Branch: MAIN
Changes since 1.26: +8 -7 lines
Diff to previous 1.26 (colored)

Fixing several timeout quirks at tftpd and tftp:

- move TIMEOUT* defines to arpa/tftp.h, as they are used several times
  in tftpd and tftp, and the values are part of the RFC definition.
- tftpd and tftp did count the total retransmission time in retries
  instead in seconds.  fixed.
- tftpd rexmt timeout was hardcoded by a define and therefore didn't
  changed when the timeout option was sent.  fixed.
- limit total retransmission timeout in tftp to also 255 seconds.
- replace obvious atoi()'s by strtonum().

ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 24 17:29:58 2006 UTC (17 years, 9 months ago) by mglocker
Branch: MAIN
Changes since 1.25: +77 -6 lines
Diff to previous 1.25 (colored)

Adding TFTP Option Extension to the tftp client according to RFC 2347.

Implemented options are:

- TFTP Blocksize Option, RFC 2348
- TFTP Timeout Interval and Transfer Size Options, RFC 2349

We have now on the tftp client side the same options supported as in
our tftp server.

ok claudio@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jul 12 16:58:51 2006 UTC (17 years, 10 months ago) by mglocker
Branch: MAIN
Changes since 1.24: +124 -123 lines
Diff to previous 1.24 (colored)

knf.  no binary change.

ok beck@ claudio@

Revision 1.24 / (download) - annotate - [select for diffs], Mon May 8 13:02:51 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.23: +89 -62 lines
Diff to previous 1.23 (colored)

Remove unsave setjmp/longjmp calls that were used in signal handlers with
a more sane poll loop. Includes some style(9) changes.
Diff made by Marcus Glocker

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 23 17:29:22 2006 UTC (18 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Include <sys/param.h> instead of <sys/types.h> so we get MAXHOSTNAMELEN

Revision 1.22 / (download) - annotate - [select for diffs], Thu Feb 19 08:43:37 2004 UTC (20 years, 3 months ago) by mpech
Branch: MAIN
CVS Tags: 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.21: +3 -2 lines
Diff to previous 1.21 (colored)

fix mem leak.

hackers@ ok

Revision 1.21 / (download) - annotate - [select for diffs], Mon Dec 22 22:17:38 2003 UTC (20 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

do not re-include name in err() call; andrushock@korovino.net

Revision 1.20 / (download) - annotate - [select for diffs], Mon Sep 29 11:23:38 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

correction to SYNOPSIS and usage(): host argument must be specified
if using port argument;

from simon@freebsd

Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 25 09:45:46 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.18: +7 -7 lines
Diff to previous 1.18 (colored)

- clarify "put" and "get" commands. This is based on a FreeBSD PR submitted
by Gary W. Swearingen and fixed by Simon L. Nielsen in rev. 1.15;
- some other small clarifications to the man page
- sync usage()'s with the man page

Revision 1.18 / (download) - annotate - [select for diffs], Wed Sep 24 20:21:40 2003 UTC (20 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +9 -8 lines
Diff to previous 1.17 (colored)

knf

Revision 1.17 / (download) - annotate - [select for diffs], Wed Sep 24 20:19:48 2003 UTC (20 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

fix automatic connection which is supposed to be done in put command;
found by jmc, fixed by me

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 25 21:09:37 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

protos

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 25 15:45:10 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +3 -4 lines
Diff to previous 1.14 (colored)

ansi

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:53 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +25 -57 lines
Diff to previous 1.13 (colored)

mostly ansi cleanup; pval ok

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

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

Revision 1.12 / (download) - annotate - [select for diffs], Thu Apr 17 17:17:27 2003 UTC (21 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.11: +8 -8 lines
Diff to previous 1.11 (colored)

nuke strcpy + -Wall

parts from and ok mickey@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Mar 13 09:09:35 2003 UTC (21 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.10: +12 -12 lines
Diff to previous 1.10 (colored)

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu

Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:55 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.9: +23 -23 lines
Diff to previous 1.9 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:16 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.8: +17 -17 lines
Diff to previous 1.8 (colored)

kill more registers

millert@ ok

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 31 14:32:15 2001 UTC (22 years, 9 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.7: +7 -7 lines
Diff to previous 1.7 (colored)

o) better struct handling;
o) use __progname in openlog(3);
o) better ERROR packets handling;

millert@ ok

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 17 02:23:59 2001 UTC (22 years, 10 months ago) by pvalchev
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

-Wall cleanup; ok deraadt

Revision 1.6 / (download) - annotate - [select for diffs], Thu Mar 22 01:34:01 2001 UTC (23 years, 2 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.5: +18 -25 lines
Diff to previous 1.5 (colored)

use err/warn, space police

Revision 1.5 / (download) - annotate - [select for diffs], Thu Dec 7 18:13:14 2000 UTC (23 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +25 -11 lines
Diff to previous 1.4 (colored)

tftp argv parsing overflow; fix by vogelke@dnaco.net and I

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 17 07:13:30 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +9 -11 lines
Diff to previous 1.3 (colored)

r?index -> strr?chr

Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 16 23:31:00 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +5 -4 lines
Diff to previous 1.2 (colored)

crank hostname length, fix one oflow; pointed out by dholland@hcs.harvard.edu

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:40:34 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:15 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:15 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.