summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd
Commit message (Collapse)AuthorAgeFilesLines
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-252-10/+10
|
* The mode can be "r+" as well on PUT, but only "a" on APPE.yar2002-08-291-1/+1
|
* Fix lexer jam on unimplemented commands.yar2002-08-291-12/+13
| | | | | Submitted by: maxim MFC after: 5 days
* Remove variables no longer used.yar2002-08-271-2/+1
|
* More inithosts() fixes:yar2002-08-271-8/+15
| | | | | | | | | | | o Don't free(3) memory occupied by host structures already in the host list. o Set hrp->hostinfo to NULL if a host record has to stay in the host list, but is to be ignored. Selecthost() knows that. o Reduce the pollution with excessive NULL checks. o Close a couple of memory leaks. MFC after: 1 week
* Fix an inconsistency between a printf-like format and its argument list.yar2002-08-271-1/+1
| | | | | Submitted by: kris MFC after: 3 days
* Add option '-W': don't log FTP sessions to wtmp.yar2002-08-232-5/+15
| | | | | Submitted by: maxim MFC after: 1 week
* Clean up hostname and hostinfo handling in inithosts():yar2002-08-201-5/+13
| | | | | | | | | o check getaddrinfo(3) return value, not result pointer o getaddrinfo(3) returns int, not pointer o don't leak memory allocated for hostnames and hostinfo structures o initialize pointers that will be checked for NULL somewhere MFC after: 1 week
* Fix a wrong comment on (hopefully) right code.yar2002-08-131-2/+2
| | | | MFC after: 3 days
* Fix command help lines:yar2002-08-131-2/+2
| | | | | | | | o PORT takes six byte values, not five. o TYPE argument is mandatory. Submitted by: demon (the 1st part) MFC after: 3 days
* Rework storing files thoroughly. This includes:yar2002-08-082-24/+84
| | | | | | | | | | | | | | | | | | | | | | | o Remove the race between stat(2) & fopen(3) when creating a unique file. o Improve bound checking when generating a unique name from a given pathname. o Ignore REST marker on APPE. No RFC specifies this case, but the idea of resuming APPE's implies this. o By default, deny upload resumes and appends by anonymous users. Previously these commands were translated to STOU silently, which led to broken files on server without any notification to the user. o Add an option, -m, to allow anonymous users to modify existing files (e.g., to resume uploads) if filesystem permissions permit. Portions obrainded from: OpenBSD MFC after: 3 weeks
* 1) Use "pathstring" instead of "STRING" consistently.yar2002-08-051-7/+5
| | | | | | | | 2) Remove unneeded "if not NULL" props from "pathstring", which will never be NULL by the lexer design. Inspired by: OpenBSD MFC after: 1 week
* Since GLOB_NOCHECK is set in the glob(3) call,yar2002-08-051-1/+1
| | | | | | | | glob(3) will return at least one pathname unless a system error has occured. It's not a "not found" error otherwise. MFC after: 3 days
* Spot places where "pathname" hasn't been checkedyar2002-08-051-3/+4
| | | | | | | | for NULL. The "pathname" rule may return NULL on a glob(3) error. Obtained from: OpenBSD MFC after: 1 week
* Disallow invalid numeric mode values for SITE CHMOD.yar2002-08-051-3/+2
| | | | | | | | | Earlier, a decimal number (e.g., 890) could be passed for mode, leading to dangerous permissions set: -1, that is, 07777. Obtained from: OpenBSD MFC after: 1 week
* Reflect in the ftpd(8) manpage the fact that ASCII SIZEyar2002-08-051-0/+3
| | | | | | requests against large files will be denied. MFC after: 10 days
* Deny the SIZE command on large files when in ASCII mode.yar2002-07-311-0/+6
| | | | | | | | This eliminates an opportunity for DoS attack. Pointed out by: maxim Inspired by: lukemftpd, OpenBSD MFC after: 2 weeks
* Conform to RFC 959, Appendix II, when replyingyar2002-07-291-2/+7
| | | | | | to a successful MKD command. MFC after: 1 week
* Make the `-v' option a synonym for `-d'yar2002-07-262-2/+5
| | | | | | | (as it was intended initially) and document it in the manpage. MFC after: 2 weeks
* Document the -u (set umask) optionyar2002-07-261-0/+9
| | | | | | (which has been there at least since 4.4BSD-Lite!) MFC after: 2 weeks
* Sort command-line options according to the mostly used style:yar2002-07-262-91/+91
| | | | | | | alphabetical order, lower and upper case of the same letter stick together, lower case first. MFC after: 2 weeks
* Use <arpa/ftp.h> stuff cleanly, without introducingyar2002-07-251-1/+3
| | | | | | | non-portable constants (in this case, hidden as offsets to the "?AEIL" string.) MFC after: 1 week
* Re-use passive data ports with the SO_REUSEADDRyar2002-07-241-10/+16
| | | | | | | | | socket option to avoid exausting the passive port space by TIME_WAIT'ing connections. PR: bin/36955 Submitted by: Maxim Konovalov <maxim@FreeBSD.org> MFC after: 2 weeks
* Remove the outdated casts to "char *" from the setsockopt(2),yar2002-07-242-17/+15
| | | | | | | | | write(2), and getipnodebyaddr(3) calls. Now all the above functions accept "void *" in that arguments and have prototypes. Thus, the casts are useless under the normal circumstances (and would be harmful if the functions had no prototypes.) MFC after: 2 weeks
* Clean up the syslog(3) messages on the setsockopt(2) errors:yar2002-07-241-12/+14
| | | | | | | | | o Always check a setsockopt(2) return value o Use a consistent message format o Don't abort if the failed setsockopt(2) was actually not vital o Use LOG_WARNING, not LOG_ERR, in non-fatal cases MFC after: 1 week
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.ume2002-07-221-4/+2
| | | | MFC after: 1 week
* Fix one RFC 959 incompliance:yar2002-07-221-3/+30
| | | | | | | | Double double-quotes in a PWD result if they appear in the directory pathname. PR: misc/18365 MFC after: 1 week
* Allow deleting and renaming stale symlinks andyar2002-07-211-2/+2
| | | | | | | | deleting symlinks pointing to directories. PR: bin/37250 Submitted by: Nino Dehne <TeCeEm@gmx.de> MFC after: 1 week
* Avoid passing NULL to freehostent(3).yar2002-07-171-1/+2
| | | | MFC after: 1 week
* Fix setting parameters for getipnodebyaddr(3):yar2002-07-171-4/+4
| | | | | | | | | o "struct addrinfo" contains a pointer to "struct sockaddr," not "struct sockaddr" itself o the function takes a pointer to "struct in*_addr", not to "struct sockaddr," so the address length must be corresponding MFC after: 1 week
* GLOB_QUOTE has been retired.mikeh2002-07-173-3/+3
|
* Use the right indent for the closing brace: it belongs to `if',yar2002-07-161-1/+1
| | | | | | | not to `for'. The previous indent was reather misleading for the code reader. MFC after: 1 week
* Replace the awkward hackery about strtok(3)yar2002-07-161-38/+56
| | | | | | | | | by conventional one-way parsing of ftphosts(5). Don't let NULL hostname pointers into virtual host records as well. PR: bin/18410 MFC after: 1 month
* Use fgetln(3) to read lines from configuration files (ftpusers, ftphosts.)yar2002-07-121-48/+78
| | | | | | | | | | | | | Thus lines of any length can be handled, unlike before. Don't assume that each line read from the files ends with a newline. As a side effect in inithosts(), don't use automatic buffer at all, utilize malloc(3) when getting local host name instead. PR: misc/21494 Reviewed by: maxim, mikeh MFC after: 1 month
* The .Nm utilitycharnier2002-07-061-9/+13
|
* Make sure to reset transflag back to zero upon succesfully using sendfile()dan2002-07-031-0/+1
| | | | | | | | to transfer a file. PR: 39362 Submitted by: TANAKA Hiroyuki <kattyo@abk.nu> MFC after: 1 week
* Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attachume2002-07-021-14/+12
| | | | | | scope identifier). MFC after: 3 weeks
* Remove trailing whitespaces.maxim2002-07-011-2/+2
|
* Move 'byte_count' calculation just before 'recvurg' check. It is a globalmaxim2002-07-011-1/+5
| | | | | | | | variable and used in myoob(). PR: bin/38928 Submitted by: Oliver Fromme <olli@secnetix.de> MFC after: 1 month
* Implement a flag to disable directory creation for anonymous users.mdodd2002-07-012-3/+12
| | | | | | PR: misc/38987 Submitted by: Peter da Silva <peter@abbnm.com> MFC after: 1 week
* Remove a GCC-specific command-line option. We should be using WARNS=nmarkm2002-06-281-1/+1
| | | | for this stuff.
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-4/+0
|
* Teach REST how to restart a file transfer after 2^31 bytes: now yylex()maxim2002-03-141-25/+33
| | | | | | | | | | | | returns off_t in yylval.u.o. REST is the only user of yylval.u.o at the moment. NB: seems lukemftpd has the same bug. PR: misc/28629 Reviewed by: ru Approved by: ru MFC after: 1 month
* Remove duplicated yacc nonterminals declarations, sort includes.maxim2002-03-111-4/+3
| | | | | | | | No functional changes from rev. 1.31. Reviewed by: ru Approved by: ru MFC after: 1 week
* Put the last added source file in proper order.obrien2002-02-271-1/+1
| | | | (and dcc the committer a dictionary)
* Rewrite the part of the conversation function that allocates the reply array;des2002-02-251-2/+5
| | | | | | it was inelegant and neglected to check the return value from malloc(3). Sponsored by: DARPA, NAI Labs
* Fix infinite loop around sendfile(2) after sending >4GB file.maxim2002-02-131-5/+3
| | | | | | | | PR: bin/33770 Submitted by: Vladislav Shabanov <vs@rambler-co.ru> Reviewed by: ru Approved by: ru MFC after: 1 month
* Lock down with WFORMAT?=1, with overrides in the subdirectories whichkris2002-02-041-0/+1
| | | | are not yet warning-clean. Tested on i386 and alpha.
* Silence some FORMAT_AUDIT warnings (one left)kris2002-02-041-2/+2
|
* o Eliminate __Pimp2002-02-034-217/+123
| | | | | | o Use new-style function definitions o remove some !__STDC__ code o eliminate register
OpenPOWER on IntegriCloud