summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove a field width specifier that's not doing anything more thanmikeh2001-09-101-6/+3
| | | | what using snprintf() achieves. It was also being used incorrectly.
* Extend the functionality offered by the -o option into a new optionsheldonh2001-09-021-1/+6
| | | | | | | | | | | | | | | -O, which limits the impact of the write-only restriction to guest users. *) The existing manual page's SYNOPSIS and option listing in the DESCRIPTION are already horribly disordered. No attempt has been made to fix this. *) The existing source's getopt() optstring and option handling switch are already horribly disordered. No attempt has been made to fix this. Discussed with: nik, -audit
* long -> off_tache2001-09-021-6/+7
| | | | | | | | | | | long -> time_t %ld -> %qd fseek -> fseeko NOTE: that fseek not works for >long offsets per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
* Add a new option, '-o', for "Write-only". Disables the RETR command,nik2001-08-281-1/+7
| | | | | | | | | preventing anyone from downloading files. In conjunction with -A, and some appropriate file permissions, this lets you create an anonymous FTP drop box for people to upload files to. The more obvious "-w" flag is already taken by NetBSD's ftpd. "-o" was available as an option letter in all three BSDs.
* Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatiblemikeh2001-07-291-1/+1
| | | | | | | | | | with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc' patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to maintain backwards compatibility. Reviewed by: sheldonh, assar Obtained from: NetBSD/OpenBSD
* Remove S/Key. PAM can do its job. Well, not quite - there is an issuemarkm2001-07-091-23/+11
| | | | | | | with the conversation function and challenges which needs to be revisited, so in the interim a hack is introduced to provide an OPIE challenge (which is random if OPIE does not apply) at all non-anonymnous logins.
* Move the definition of epsvall out of #ifdef VIRTUAL_HOSTING so thatdd2001-06-131-2/+2
| | | | the latter is not required for ftpd to compile.
* Change names of functions and variables with global scope that aremarkm2001-04-281-10/+10
| | | | | in conflict with library values of the same name. This allows static linking.
* Add full PAM support for account management and sessions.markm2001-03-271-9/+50
| | | | | | | The PAM_FAIL_CHECK and PAM_END macros in su.c came from the util-linux package's PAM patches to the BSD login.c Submitted by: "David J. MacKenzie" <djm@web.us.uu.net>
* Teach ftpd about the new GLOB_MAXPATH flag.jlemon2001-03-191-0/+9
|
* When the file was transferred using sendfile(2), we forgot to keep trackdes2001-03-111-0/+1
| | | | | | of the transferred byte count. MFC candidate. PR: bin/25699
* In send_data(), use sendfile() instead of the mmap() algorithm.dan2000-12-201-20/+22
|
* Add option -E to disable EPSV which throws certain stateful firewallsphk2000-12-161-1/+11
| | | | | | | | | into confusion. Add option -r to make ftpd support only read-only operations. Submitted by: Flemming (F3) Jacobsen <fj@batmule.dk> Reviewed by: phk
* Format string paranoiakris2000-11-191-2/+2
|
* Fix broken PAM with SKEY behaviour: the skey.access file checksguido2000-10-121-7/+8
| | | | were broken because the code failed to set PAM_RHOST.
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-101-2/+3
| | | | <time.h>).
* Don't set an arbitrary limit on username lengths; use MAXLOGNAMEsheldonh2000-08-171-1/+1
| | | | | | | instead. PR: 20675 Submitted by: Vladimir B Grebenschikov <vova@express.ru>
* Fix `control socket: Protocol not supported' failure inru2000-08-161-3/+2
| | | | standalone -D mode when neither -4 nor -6 is specified.
* Honour skey.access(5) by allowing UNIX passwords when skeyaccess(3)sheldonh2000-08-011-4/+10
| | | | | | | | | | | | has set pwok to a non-zero value. Previously, the fact that skey.access(5) allowed UNIX passwords for this connection attempt was ignored, even in the NOPAM case. This only addresses the NOPAM case; when libpam is used, the problem will persist. PR: 20333
* Fix a problem in the virtual host address compare code which causeddavidn2000-06-261-8/+11
| | | | | | | duplicated host entries in /etc/ftphosts not to be folded. Make sure we exit the loop on a match. PR: bin/19390
* 1. Add IPv6 portrange restriction code (-U flag) to passive().nsayer2000-05-251-0/+31
| | | | | 2. Add portrange restriction code (for both v4 and v6) to the EPSV processing stuff.
* Add more dual stack consideration.shin2000-02-101-19/+27
| | | | | | | -ftpd need to know each of AF_INET and AF_INET6 addr for hosts specified in /etc/ftphosts. Approved by: jkh
* Fix ftpd core dump when hostname is not set.shin2000-02-031-1/+2
| | | | | | | | | When hostname is not set, ftpd core dumps, because there is no NULL check for freeing name resolving information for its own hostname. So the check is added. Approved by: jkh
* another tcp apps IPv6 updates.(should be make world safe)shin2000-01-271-88/+415
| | | | | | | ftp, telnet, ftpd, faithd also telnet related sync with crypto, secure, kerberosIV Obtained from: KAME project
* Fix for new Kerberos4. Make a fist cut at PAM-ising while I'm here.markm1999-09-191-20/+140
|
* When a STAT command is sent to ftpd as an out-of-band transmission duringmharo1999-09-121-0/+1
| | | | | | | | a file transfer, the command was mishandled on every other receipt of the command. PR: 13261 Submitted by: Ian Lepore <ian@plutotech.com>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyonepeter1999-08-261-5/+1
| | | | | really dislikes this, we could add a switch to disable it at runtime and check in popen.c.
* More egcs warning fixes:imp1999-04-251-2/+3
| | | | | | | | | | o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). Reviewed by: obrien and chuckr
* Ensure that things returned by gethostname() andbrian1999-04-071-4/+5
| | | | | | | | | | friends are terminated and allow for a maximum host name length of MAXHOSTNAMELEN - 1. Put parenthesis around sizeof args. Make some variables static. Fix telnetd -u (broken by my last commit) Prompted by: bde
* Use realhostname() rather than various combinations ofbrian1999-04-061-9/+3
| | | | | | gethostbyaddr() & gethostbyname(). Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.
* Set the user context correctly so that cd ~ does the right thing.des1998-10-131-9/+4
| | | | | | PR: bin/7943 bin/8293 Submitted by: Bill Fenner <fenner@parc.xerox.com> Approved by: jkh
* signal() returns SIG_ERR on error, not int.jb1998-06-031-4/+4
| | | | time() requires a time_t pointer, not a long.
* Make ftpd(8) honor its default group setting in the config files.steve1998-05-251-7/+16
| | | | | PR: 6682 Submitted by: Max Euston <meuston@jmrodgers.com>
* Return back initial tzset() must be before first chrootache1998-05-161-1/+3
|
* Move TZ="" assignment just before exec to not touch other time stuffache1998-05-151-4/+1
|
* Do TZ= as first thing, since FTP protocol is unable to tell zone offset inache1998-05-151-2/+3
| | | | | | | | | any case. It makes no difference for anon account (since chroot already makes it GMT), but if you do mirror with special non-anon login, in old variant your mirror will be wholy retransmitted twice in the year due to time zone changes (/etc/localtime plays bad role here)
* Set TCP_NODELAY on the control channel to improve performance a bit.dg1998-04-281-1/+8
|
* Make ftpd log IP-addresses in addition to hostnames.eivind1998-02-241-2/+3
|
* Various sprintf -> snprintf fixes.imp1997-12-241-7/+9
| | | | | Minor style fix (strcpy(foo,"") -> *foo = '\0') Obtained from: OpenBSD(?)
* Cosmetics in man page. Exit(-1) -> exit(1).charnier1997-11-211-5/+5
|
* Hopefully better fix for logwtmp(): rename to a privatetg1997-09-051-4/+4
| | | | version ftpd_logwtmp().
* Make useage of hostname global variable consistent.davidn1997-07-241-5/+5
| | | | | PR: 4135 Based on submitted patch by: blank@fox.uni-trier.de
* Tell the chroot()ed user that "access restrictions apply".danny1997-05-211-1/+6
|
* login_getclass() -> login_getpwclass().davidn1997-05-101-2/+2
|
* Adds anon ftp virtual host capability to ftpd, using /etc/ftphosts fordavidn1997-04-291-9/+217
| | | | definition of a system's virtual hosts.
* YAMF2.2: Allow @group entries in /etc/ftpusers & /etc/ftpchroot to denydavidn1997-04-271-5/+21
| | | | and allow chroot access to entire groups.
* Adds optional "internal ls" support for ftpd, by collectingdavidn1997-04-261-3/+8
| | | | | | | | | | | modules from src/bin/ls, and handling exec(_PATH_LS,..) as a special case, very useful in an environment where many users are given chroot access. "~/etc/{s}pwd.db" files are still needed if uid/gid->user/group translation is desired. To enable this it must be compiled with the make variable FTP_INTERNAL_LS defined, either in /etc/make.conf or the environment.
* Add basic login.conf (sans authentication) support.davidn1997-04-231-3/+49
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
OpenPOWER on IntegriCloud