aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tftp
Commit message (Collapse)AuthorAgeFilesLines
* Update Makefile.depend filesSimon J. Gerraty2024-10-141-0/+10
| | | | | | | After building packages we have a number of new and updated Makefile.depend files Reviewed by: stevek
* Remove residual blank line at start of MakefileWarner Losh2024-07-152-2/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* usr.bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-3/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-10/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-275-11/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-162-4/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-2/+0
|
* tftp tests: Fix a typo in the makefileMark Johnston2023-03-261-1/+1
| | | | Fixes: 64c2a712d661 ("tftp: Add tests.")
* tftp: Add test cases for URL mode.Dag-Erling Smørgrav2023-03-131-0/+59
| | | | | | Sponsored by: Klara, Inc. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D39014
* tftp: Add tests.Dag-Erling Smørgrav2023-03-103-0/+421
| | | | | | Sponsored by: Klara, Inc. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D38969
* tftp: Correctly propagate transfer errors.Dag-Erling Smørgrav2023-03-103-29/+34
| | | | | | Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38958
* tftp: cleanupDag-Erling Smørgrav2022-11-181-12/+13
| | | | | Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37433
* tftpd: Plug memory leaks in option handling code.Dag-Erling Smørgrav2022-11-181-16/+10
| | | | | Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37423
* tftpd: whitespace cleanupDag-Erling Smørgrav2022-11-171-2/+2
|
* tftp: Fix buffer overflow and fd leak in multi-file PUT.Dag-Erling Smørgrav2022-11-171-6/+12
| | | | | Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37422
* update external URLWolfram Schneider2022-02-051-1/+1
|
* Fix a few mandoc issuesGordon Bergling2020-10-091-8/+12
| | | | | | | | | | | - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order - normalizing date format - AUTHORS section without An macro Notes: svn path=/head/; revision=366572
* Add support for the TFTP windowsize option described in RFC 7440.John Baldwin2020-03-022-1/+38
| | | | | | | | | | | | | | The windowsize option permits multiple blocks to be transmitted before the receiver sends an ACK improving throughput for larger files. Reviewed by: asomers MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23836 Notes: svn path=/head/; revision=358556
* tftp: fix two minor Coverity CIDsAlan Somers2019-10-031-1/+2
| | | | | | | | | | | Reported by: Coverity CID 1394842: file descriptor leak in an error path CID 1007603: single byte array overflow MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21695 Notes: svn path=/head/; revision=353068
* tftp(1): switch default transfer mode to binaryAlan Somers2018-08-232-3/+3
| | | | | | | | | | | | netascii is obsolete and inefficient. It isn't even supported by many clients. Better to use binary mode by default. Reviewed by: cem Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16869 Notes: svn path=/head/; revision=338258
* tftp: Close a resource leak when putting filesAlan Somers2018-08-141-0/+1
| | | | | | | | | Reported by: Coverity CID: 1394842 MFC after: 2 weeks Notes: svn path=/head/; revision=337779
* Fix several Coverity warnings in tftpAlan Somers2018-07-222-3/+12
| | | | | | | | | | | | | | | | | Some of the changes are in the libexec/tftpd directory, but to functions that are only used by tftp(1) (they share some code). * strcpy => strlcpy (1006793, 1006794, 1006796, 1006741) * Unchecked return value and TOCTTOU (1009314) * NULL pointer dereference (1018035, 1018036) Reported by: Coverity CID: 1006793, 1006794, 1006796, 1006741, 1009314, 1018035 CID: 1018036 MFC after: 2 weeks Notes: svn path=/head/; revision=336609
* tftpd: Flush files as soon as they are fully receivedAlan Somers2018-03-091-1/+0
| | | | | | | | | | | | | | | | | | On an RRQ, tftpd doesn't exit as soon as it's finished receiving a file. Instead, it waits five seconds just in case the client didn't receive the server's last ACK and decides to resend the final DATA packet. Unfortunately, this created a 5 second delay from when the client thinks it's done sending the file, and when the file is available for other processes. Fix this bug by closing the file as soon as receipt is finished. PR: 157700 Reported by: Barry Mishler <barry_mishler@yahoo.com> MFC after: 3 weeks Notes: svn path=/head/; revision=330710
* Fix uninitialized warning, and work around a bug in gcc over clobberingJustin Hibbits2018-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: r329077 caused gcc to emit uninitialized use warnings. Attempting to fix those warnings yielded the following warnings: usr.bin/tftp/main.c: In function 'main': usr.bin/tftp/main.c:181: warning: variable 'el' might be clobbered by 'longjmp' or 'vfork' usr.bin/tftp/main.c:182: warning: variable 'hist' might be clobbered by 'longjmp' or 'vfork' This is a known bug in gcc, found at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24239 Work around that by simply marking hist and el as static. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14302 Notes: svn path=/head/; revision=329106
* tftp(1): Clean up leading and trailing whitespaceConrad Meyer2018-02-091-6/+6
| | | | | | | | | Whitespace-only change. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=329079
* tftp(1): Fix libedit state corruption involving signalsConrad Meyer2018-02-091-21/+29
| | | | | | | | | | | | | This bug was first reported 14 years ago. The problem was understood 8.5 years ago. A patch that is functionally identical to this one was proposed almost 8 years ago and languished in the PR system / Bugzilla. PR: 63197 Submitted by: lxv AT omut.org, fernando.apesteguia AT gmail.com Reported by: freebsd AT nbritton.org Notes: svn path=/head/; revision=329077
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-203-3/+9
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Adopt SRCTOP in usr.binWarner Losh2017-03-121-2/+2
| | | | | | | | | | | | Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Notes: svn path=/head/; revision=315170
* Renumber copyright clause 4Warner Losh2017-02-284-4/+4
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Use MIN() macro from sys/param.h.Marcelo Araujo2016-04-271-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298685
* Partially revert the change on r298325 where there is anMarcelo Araujo2016-04-201-1/+1
| | | | | | | | | | (-1) casted to a pointer. Submitted by: pfg MFC after: 2 weeks. Notes: svn path=/head/; revision=298327
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-201-2/+2
| | | | | | | | | Small cosmetic change. MFC after: 2 weeks. Notes: svn path=/head/; revision=298325
* - uri is expected to be nul-terminated (strchr used later),Xin LI2015-08-311-4/+3
| | | | | | | | | | so use strlcpy instead of strncpy. - unroll the other two cases of strncpy+\0 to strlcpy. MFC after: 2 weeks Notes: svn path=/head/; revision=287320
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-192-3/+3
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2014-04-281-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync from headSimon J. Gerraty2012-11-041-2/+2
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | Replace all uses of libncurses and libtermcap with their wide characterBrooks Davis2014-07-171-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=268804