aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tftp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | | Increase MAXLINE to deal with longer paths.Marcel Moolenaar2014-03-041-1/+1
| |/ |/| | | | | | | | | | | Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=262721
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-191-2/+2
|/ | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. Notes: svn path=/head/; revision=241737
* General mdoc(7) and typo fixes.Glen Barber2012-05-101-2/+2
| | | | | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Notes: svn path=/head/; revision=235211
* Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-291-4/+4
| | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
* Only use macros inside a reference block.Joel Dahl2012-03-271-10/+5
| | | | | | | Discussed with: brueffer Notes: svn path=/head/; revision=233574
* fgets(3) returns a pointer, so compare against NULL, not integer 0.Kevin Lo2012-01-131-1/+1
| | | | Notes: svn path=/head/; revision=230044
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-7/+7
| | | | | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls. Notes: svn path=/head/; revision=229403
* peeraddr is only used in sizeof() evaluations, so instead of declaring itXin LI2011-07-111-1/+1
| | | | | | | | | a variable, use typedef. MFC after: 1 month Notes: svn path=/head/; revision=223926
* Remove duplicated header filesKevin Lo2011-06-241-1/+0
| | | | Notes: svn path=/head/; revision=223493
* Acknowledge Edwin Groothuis for the major rewrite heCraig Rodrigues2011-06-241-1/+7
| | | | | | | did of the tftpd and tftp code to support TFTP blocksize. Notes: svn path=/head/; revision=223491
* Update references to RFC's that the newer TFTP implementation supports.Craig Rodrigues2011-06-221-0/+34
| | | | Notes: svn path=/head/; revision=223451
* Bump date.Craig Rodrigues2011-06-221-1/+49
| | | | | | | | Document the following commands which were added in the new TFTP implementation: blocksize, blocksize2, packetdrop, options, rollover Notes: svn path=/head/; revision=223447
* Clarify that the TFTP blocksize (RFC2348) or non-standardCraig Rodrigues2011-06-161-2/+3
| | | | | | | TFTP rollover option can be used to transfer larger files. Notes: svn path=/head/; revision=223137
* Specify correct RFC2347 for TFTP options in diagnostic message.Craig Rodrigues2011-06-161-2/+2
| | | | Notes: svn path=/head/; revision=223135
* Fix a couple of spelling errors.Warner Losh2011-05-311-3/+3
| | | | | | | Submitted by: bcr@ Notes: svn path=/head/; revision=222534
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-114-16/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Make WARNS=6 clean.Marius Strobl2010-09-242-28/+23
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=213099
* Try to adhere to style.Makefile(5).Marius Strobl2010-09-231-4/+6
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=213075
* Remove an explicit assignment of the CFLAGS variable intended forMarius Strobl2010-09-231-1/+0
| | | | | | | | | debugging purposes only. MFC after: 3 days Notes: svn path=/head/; revision=213053