summaryrefslogtreecommitdiff
path: root/libexec
AgeCommit message (Collapse)Author
2000-07-23* make checkportcmd the default. this breaks third-party proxy ftp butlukem
prevents the ftp bounce attack, and we should be secure out of the box, not require users to tweak obscure stuff. * allow the version string reported to clients to be changed with '-V vers'. if vers is empty or `-', don't report a version. * if -r is given, permanently drop root privs * if not a REAL user (i.e, GUEST or CHROOT), and ftpd is running on a port > IPPORT_RESERVED+1, permanently drop root privs * don't bother reverting to root privs to logout of wtmp/utmp; since the file descriptor is already open this isn't necessary. * fix the binding of the port for the PORT/LPRT/EPRT connection to be the ctrl_addr.su_port-1, not hardcoded to `20' (this was broken in the ipv6 merge). if root privs have been dropped, and this would be a port < IPPORT_RESERVED, use a random port instead (which isn't RFC959 compliant but it doesn't appear that many clients care). * prevent login of a new user if privs have been dropped and already logged in as a REAL user (existing check already stops GUEST & CHROOT users). * move the port check stuff into a separate port_check() function, and use for PORT, LPRT, and EPRT checks. inspired by freebsd * minor KNF * minor man page cleanup
2000-07-19Make it build on non-VARPSZ again.thorpej
2000-07-18Fix some issues with SPARC V9 ELF binaries.eeh
2000-07-17More VAX ELF changes.matt
2000-07-17* add two new ftpd.conf(5) directives:lukem
chroot specify dir to chroot to for GUEST and CHROOT users, to override -a anondir or the user's homedir. homedir specify dir to change to upon login; also used for ~ expansion and $HOME for subprocesses) both of these can take % escapes: %u (username), %d (homedir), %c (class). * fix NLST to take a pathname not a STRING, so that ~ expansion works * modify CWD to use the homedir parsed from curclass.homedir * implement format_path(dst, src), to parse src expanding % escapes (see above) into dst. * rename format_file() to display_file()
2000-07-15* add -H, which acts like -h `hostname`. (requested by kim@)lukem
* refer to draft-ietf-ftpext-mlst-11 instead of -10
2000-07-14No need for RELOCATE_SELF since the VAX does real PIC. Rewrite the bindmatt
routine to deal with JMP .vs. CALLx differences.
2000-07-14Split DEBUG into two lines to make it easier to enable each separately.matt
2000-07-14Update to reflect VAX ELF reality.matt
2000-07-14Initialize ld.elf_so's textsize.matt
2000-07-13Added support for the SPARC v9 ABI.eeh
2000-07-13Invoke "nroff" with "-S" (safer mode) option because "makewhatis" istron
usually invoked by "root".
2000-07-13Kill "nroff" process and wait for its terminiation if we can't setuptron
the "libz" file handle.
2000-07-13Optimize invokation of "nroff":tron
- Redirect standard error to "/dev/null" because "nroff" error messages for temporary files aren't really useful. - Don't let "nroff" open temporary file. Use its file descriptor as standard input.
2000-07-10base64_encode(): separate out the special case for the last 2 bytes, andlukem
be a bit safer with signed chars. per discussion with kre.
2000-07-10Check exit code returned from "nroff" if it is used to converttron
unformatted manual pages.
2000-07-09Invoke "nroff" and parse its output if an unformatted manual page usestron
macros. Fixes PR bin/9083 by Geoff C. Wing.
2000-07-09- base64_encode(): fix garbled output due to fencepost error. output nowlukem
appears to match that of 'mimencode' (from metamail). problem noted by kre@munnari.oz.au. - fact_unique(): encode a combined dev_t+ino_t chunk rather than separate bits
2000-07-09setproctitle(), and for any other printf variants, it is not a good idealukem
to pass variable directly like foo(x). use foo("%s", x) to avoid misuse. from: openbsd
2000-07-09More -Wformat cleanups.sommerfeld
2000-07-08More format paranoia.sommerfeld
2000-07-06fix non-portable bit-fieldschristos
2000-07-05setproctitle(), and for any other printf variants, it is not a good ideaitojun
to pass variable directly like foo(x). use foo("%s", x) to avoid misuse. from: openbsd
2000-07-05remove extra period in SEE ALL sectionmsaitoh
2000-07-04cleaner changes corrseponding to kernel changesperseant
2000-07-03Make things builds with GCC 2.96matt
2000-07-03shut gcc up about a bogus possibly used before initialized.matt
2000-07-03Treat short and byte print formats as and cast to the right size.matt
2000-07-03Update to current <machine/asm.h>matt
2000-07-03If OBJECT_FMT is ELF and MACHINE_ARCH = vax, build ld.elf_somatt
2000-07-03User-level changes corrseponding to my latest kernel changes.perseant
newfs_lfs gives lfs_minfreeseg a value of 1/8 of the total segments on the disk, based on rough empirical data, but this should be refined in the future.
2000-07-02add man-pages for kf and kfdassar
2000-06-29remove include of <vm/vm.h>mrg
2000-06-26we now need <uvm/uvm_param.h>mrg
2000-06-25Use LOGIN_NAME_MAX for sizing the mailname buffer. Allows usernamessimonb
longer than 8 characters to run jobs instead of aborting because "File ... is in wrong format".
2000-06-23Add MK... variables to enable/disable various aspects of buildingthorpej
crypto support into the system. See share/mk/bsd.README for more a full description.
2000-06-22Bring the telnet situation back into better shape. Specifically,thorpej
pull in just about all of the differences from the crypto-us telnet suite (which includes Kerberos 4 and connection encryption support). Also bring in the Kerberos 5 support from the Heimdal telnet, and frob a little so that it can work with the non-Heimdal telnet suite. There is still some work left to do, specifically: - Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4 module. - Add connection encryption support to the Heimdal Kerberos 5 module. Hints on this can be taken from the MIT Kerberos 5 module which still exists in crypto-us. However, even with the shortcomings listed above, this is a better situation than using the stock Heimdal telnet suite, which does not understand the IPSec policy stuff, and is also based on much older code which contains bugs that we have already fixed in the NetBSD sources.
2000-06-21Make sure to segunmap segments on error in lfs_bmapv or lfs_markv. Preventsperseant
a memory leak of by default 1 Mb per error. May fix PR #9149.
2000-06-20fix problems noted by <dogcow@redback.com> in [bin/10390] and private email:lukem
* fix RATE{GET,PUT} under some situations when the client is slower than the server (something i missed when migrating the rate limiting code i wrote in ftp(1) to ftpd(8)) * document what units RATE{GET,PUT} use
2000-06-20Merge a bunch of things from crypto-us and crypto-intl into basesrc,thorpej
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate bsd.crypto.mk. There is still a bunch more work to do, but crypto is now more-or-less fully merged into the base NetBSD distribution.
2000-06-19rewrite method of traversing facttab[]; use size of list to terminatelukem
not NULL terminated entry (since we need to know the size of other reasons...)
2000-06-19various fixes suggested by Robert Elz:lukem
* implement closedataconn() and use appropriately (including in mlsd()) * only put leading space in front of MLST output (not MLSD output) * MLSD: only output pdir and cdir entries when the type fact is requested. * change error code for giving MLSD a non-directory from 550 to 501 * remove MLSx Type fact support for UNIX.* for now; it's not standardised yet. * do a check_login when MLSD and MLST are given no args * detect & complain about null facts in OPTS MLST * cache getgroups() at login instead of calling each time in fact_perm() other mods: * implement cprintf(); as per fprintf() but increments total_bytes{,_out} * implement CPUTC(); as per putc() but increments total_bytes{,_out} * implement base64_encode() * fact_unique() display base64 encoding of dev_t and ino_t rather than hex output; should scale if size of those changes * change reply() so that a negative code acts as the initial line in a reply, code == 0 prefixes the line with 4 spaces, and code > 0 works as before. deprecate lreply(code, ) and lreply(0, ) in favour of reply(-code, ) and reply(0, ) respectively. * use cprintf() and CPUTC() appropriately (often instead of printf(), lreply(-2, ) or lreply(-1, ). now we actually account for the data sent by MLST and MLSD. * remove DEBUG support for sending MLSD output to control connection instead of data connection (my ftp client now supports MLSD :-)
2000-06-16Fixup Heimdal libexec builds.thorpej
2000-06-16Import libexec portions of Heimdal, from cryptosrc-intl.thorpej
2000-06-16include <krb5/krb5.h> before including extern.h, so krb5_context is definedexplorer
2000-06-16Also set __mainprog_obj so .ini sections can call dlopen()christos
2000-06-14sweep of my licenses (userland files w/o only my copyright) forcgd
consistency. (no functional changes)
2000-06-14correct LPSV/LPRT display on STAT command.itojun
(did not crank the version since the change is on the same day)
2000-06-14major overhaul (just before netbsd 1.5 :-):lukem
* implement draft-ietf-ftpext-mlst-10 commands, especially MLST and MLSD. we already supported SIZE and MDTM. add the appropriate FEAT output lines. * migrate a lot of the command code from ftpcmd.y and ftpd.c to cmds.c * make dataconn(), feat(), lookup(), opts() and sizecmd() public * modify struct tab so that it has a `flags' instead of `implemented' element, and remove the `hasopts' element. If flags == 1, the command is implemented. if flags == 2, the command is implemented and takes options * add macros ISDOTDIR(x) (is x ".") and ISDOTDOTDIR(x) (is x "..") * modify lreply() so that lreply(-2, ...) just outputs the given info without a prefix or trailing \r\n. this saves doing b = printf(); total_* += b; * enhance statcmd(). still needs work in the LPRT status stuff. * crank version
2000-06-14fix up NetBSD RCS Ids to match the standard, and the leading comment ascgd
to match as well. No functional changes.