aboutsummaryrefslogtreecommitdiff
path: root/libexec/ftpd
Commit message (Collapse)AuthorAgeFilesLines
* Fix ftpd privilege escalation via ftpchroot.Gordon Tetlow2020-09-151-4/+11
| | | | | | | | | | Approved by: so Approved by: re (implicit for releng/12.2) Security: FreeBSD-SA-20:30.ftpd Security: CVE-2020-7468 Notes: svn path=/releng/12.2/; revision=365781
* MFC r362569 (by jkim):Don Lewis2020-07-251-0/+2
| | | | | | | Fix build with recent byacc. Notes: svn path=/stable/12/; revision=363535
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-192-3/+6
| | | | | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Also update affected Makefile.depend files. MFC of r355616 and r355617 Reviewed by: bdrewery Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/stable/12/; revision=355906
* Move ftpusers to libexec/ftpd/Brad Davis2018-08-212-0/+30
| | | | | | | | | | | Thsi helps with pkgbase by switching to CONFS so that ftpusers will be properly tagged as a config file. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16787 Notes: svn path=/head/; revision=338147
* Use strlcpy().Xin LI2017-12-051-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=326562
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-206-5/+17
| | | | | | | | | | | | | | | | | 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
* ftpd(8): fix user context handling.Eugene Grosbein2017-10-061-4/+17
| | | | | | | | | | | | | | | | | | Apply authenticated user context after update of wtmp(5) at start of session, so that ftpd process is not killed by kernel with SIGXFSZ when user has "filesize" limit lower than size of system wtmp file. Same applies to session finalization: revert to super-user context before update of wtmp. If ftpd hits limit while writing a file at user request, do not get killed with SIGXFSZ instantly but apparently ignore the signal, process error and report it to the user, and continue with the session. PR: 143570 Approved by: avg (mentor), mav (mentor) MFC after: 1 week Notes: svn path=/head/; revision=324364
* Improve blacklist support before upgrading libblacklistKurt Lidl2017-05-062-3/+5
| | | | | | | | | | | | | | | The locally declared enum of blacklistd actions needs to be hidden when the soon to be committed changes to libblacklist are brought into the tree. Fix the type of the "msg" parameter to match the library. There should be no functional changes. MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=317862
* libexec: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-3/+2
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314653
* Fix build when WITHOUT_BLACKLIST=yes is specifiedKurt Lidl2016-11-121-3/+0
| | | | | | | | | | | PR: 214409 Submitted by: matthew Reported by: matteo MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=308567
* Revisit blacklistd support in ftpdKurt Lidl2016-11-014-15/+50
| | | | | | | | | | | | | | | | Enhance blacklistd support to not log anything by default, unless blacklistd support is enabled on the command line. Document new flag in man page, cleanup patches to be less intrusive in code. Reported by: Rick Adams Reviewed by: cem, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8374 Notes: svn path=/head/; revision=308175
* DIRDEPS_BUILD: Update dependenciesBryan Drewery2016-06-141-0/+2
| | | | | | | | Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301891
* Update blacklist support in ftpd to clarify fd usageKurt Lidl2016-06-062-13/+11
| | | | | | | | | | | | | | | | The ftp daemon dups the control socket to stdin and uses that fd throughout the code. Clarify this usage slightly by changing from explicit use of "0" for the fd to a variable, to make it clear what the zero represents in the non-blacklist code. Make the blacklist_notify routine use STDIN_FILENO so as to have less of a "magic number" feel to the code. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6716 Notes: svn path=/head/; revision=301517
* Add blacklist support to ftpdKurt Lidl2016-06-034-0/+109
| | | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6703 Notes: svn path=/head/; revision=301241
* Declare line[] in the outermost scope of retrieve() instead ofDon Lewis2016-05-131-3/+3
| | | | | | | | | | | declaring it in an inner scope and then using it via a pointer in the outer scope. Reported by: Coverity CID: 605895 Notes: svn path=/head/; revision=299585
* Rename getline with get_line to avoid collision with getline(3)Baptiste Daroussin2016-05-103-5/+5
| | | | | | | | When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Notes: svn path=/head/; revision=299356
* libexec: minor spelling fixes in comments.Pedro F. Giffuni2016-05-012-2/+2
| | | | | | | No functional change. Notes: svn path=/head/; revision=298897
* ftpd: replace malloc + memset 0 with calloc.Pedro F. Giffuni2016-04-181-3/+2
| | | | | | | | It is faster and usually safer. Use NULL instead of zero for the pointer. Notes: svn path=/head/; revision=298211
* DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-2/+0
| | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* Upgrade libxo to 0.4.5.Marcel Moolenaar2015-08-241-1/+1
| | | | | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo Notes: svn path=/head/; revision=287111
* Needs libxoSimon J. Gerraty2015-06-141-0/+1
| | | | Notes: svn path=/head/; revision=284371
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-8/+5
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * | 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 from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ Merge headSimon J. Gerraty2014-04-287-35/+9
| |\ \ \ | | | | | | | | | | | | | | | 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
| * | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-1/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | Sync from headSimon J. Gerraty2012-11-041-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Fix build after converting ls(1) to use libxo(3).Marcel Moolenaar2015-06-101-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Notes: svn path=/head/; revision=284221
* | | | | Convert to LIBADDBaptiste Daroussin2014-11-251-8/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275077
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | Remove the 3rd clause ("advertising clause") of the BSD license asChristian Brueffer2014-02-177-35/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permitted by the University of Berkeley on July 22, 1999. Reviewed by: imp MFC after: 1 week Notes: svn path=/head/; revision=262136
* | | In sgetpwnam(), save and free pw_class like all other char membersChristian Brueffer2014-02-141-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | of struct passwd. This fixes spurious "login_getclass: unknown class" errors. PR: 186439 Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp> MFC after: 1 week Notes: svn path=/head/; revision=261885
* | Bump date missed in r202756Eitan Adler2012-09-141-1/+1
|/ | | | | | | | | | PR: docs/171624 Submitted by: bdrewery Approved by: gabor MFC after: 3 days Notes: svn path=/head/; revision=240506
* Spelling fixes for libexec/Ulrich Spörlein2012-01-071-1/+1
| | | | Notes: svn path=/head/; revision=229780
* Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]Colin Percival2011-12-232-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Notes: svn path=/head/; revision=228843
* Add LOGIN_SETCPUMASK and LOGIN_SETLOGINCLASS to the setusercontext(3)Edward Tomasz Napierala2011-06-221-6/+5
| | | | | | | calls in ftpd(8). Notes: svn path=/head/; revision=223434
* Make format string a string literal. (Discovered by clang.)Ed Maste2011-01-041-1/+1
| | | | | | | MFC After: 1 week Notes: svn path=/head/; revision=216945
* Handle failure from ftpd_popen in statfilecmd().Ed Maste2011-01-041-0/+4
| | | | | | | | Reviewed by: attilio MFC after: 1 week Notes: svn path=/head/; revision=216943
* expand checkuser() to support the propagation of error codes back toChristian S.J. Peron2011-01-031-8/+27
| | | | | | | | | | | | | | the caller. Currently, checkuser() does not differentiate between the failure to open the file and the absence of a user in the file. Check to see if there was an error opening the file. If there are any errors, terminate the connection. Currently, the only exception to this rule is ENOENT, since there is nothing that says the /etc/ftpuser and /etc/ftpchroot has to exist. MFC after: 3 weeks Notes: svn path=/head/; revision=216932
* mdoc: drop redundant .Pp and .LP callsUlrich Spörlein2010-10-081-2/+0
| | | | | | | They have no effect when coming in pairs, or before .Bl/.Bd Notes: svn path=/head/; revision=213573
* Check that gl_pathc is bigger than zero before derefencing gl_pathv.Xin LI2010-03-251-1/+2
| | | | | | | | | | | | When gl_pathc == 0, the content of gl_pathv is undefined. PR: bin/144761 Submitted by: David BERARD <contact davidberard fr> Obtained from: OpenBSD MFC after: 1 week Notes: svn path=/head/; revision=205656
* Set ut_line to "ftpd" for ftpd.Ed Schouten2010-02-091-0/+1
| | | | | | | | | | | This makes it a little easier to figure out which application was responsible for this log entry. Ideally we should add an ut_process or something similar. Suggested by: Vincent Poy <vincepoy gmail com> Notes: svn path=/head/; revision=203698
* Remove stale references to utmp(5) and its corresponding filenames.Ed Schouten2010-01-211-2/+1
| | | | | | | I removed utmp and its manpage, but not other manpages referring to it. Notes: svn path=/head/; revision=202756