Commit Graph

1230 Commits

Author SHA1 Message Date
assar 142187795f (scrub_env): change to only accept a listed set of variables,
including only non-filename contents for TERMCAP
2000-12-09 00:50:21 +00:00
itojun 6e3f1ac15c in replydirname(), avoid one-byte overrun.
From: Kristian Vlaardingerbroek <kris@obit.nl> (to bugs@openbsd)
2000-12-04 10:50:39 +00:00
lukem af83a0d7c4 fix typo 2000-12-01 07:59:47 +00:00
simonb 0833efd07d Remove extern variables and functions now declared in dkstats.h. 2000-12-01 02:10:22 +00:00
simonb 80bd9216d2 ANSIfy. 2000-11-30 23:59:03 +00:00
lukem c31c7b7d00 initialise confdir to _DEFAULT_CONFDIR again, so that -C works... 2000-11-30 08:33:33 +00:00
lukem b01ed05afa - rename valid_passwd() -> checkpassword()
- move check for expired accounts from pass() into checkpassword()
2000-11-30 06:06:08 +00:00
lukem be437fb5c3 - move password checking into separate valid_passwd() function, to assist
in porting to other systems.
- don't syslog() or setproctitle() "ACCT" lines (as per "PASS")
- replace #ifdef HASSETPROCTITLE with #if HAVE_SETPROCTITLE, and set the
  latter #ifdef BSD4_4
- don't compile in internal `ls' #ifdef NO_INTERNAL_LS. will need Makefile
  support if this is to be used on NetBSD.
2000-11-30 02:59:11 +00:00
simonb ba632e7078 Use the vm.uvmexp2 sysctl. 2000-11-29 11:18:33 +00:00
lukem dd752c833d modify dolog() to take a struct sockinet * instead of struct sockaddr * 2000-11-28 09:46:34 +00:00
lukem a1d4e29274 - ensure all uses of AF_INET6 are wrapped in #ifdef INET6
- don't define `ALL' as a token twice in the grammar
2000-11-28 09:31:29 +00:00
mycroft e496c5f86f Add another debugging message. 2000-11-28 06:01:46 +00:00
mycroft 6025f99517 Make this compile with -DDEBUG. 2000-11-28 06:01:34 +00:00
mycroft 6ec13b9d73 Return an error when there are too many segments rather than abort()ing.
This way `ldd /usr/libexec/ld.elf_so' doesn't core dump.
2000-11-26 05:22:15 +00:00
itojun f28aa6da4e cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach
scope identifier).
always check error result from getnameinfo.
2000-11-24 12:56:45 +00:00
perseant 59ca5b76e4 Don't "compress" segment data if we were using mmap instead of malloc/copy
to read the segment.
2000-11-23 23:01:55 +00:00
perseant c019319ae3 Check for ENOENT return from lfs_{bmapv,markv} and do the right thing with it,
avoiding needless looping (possibly infinite looping) on certain kinds of
errors.

Get rid of erroneous free() in error return from add_segment.

Patch from Jesse Off <joff@gci-net.com> (PR #11547).
2000-11-22 22:17:39 +00:00
itojun b7b6056081 make sure we do not overrun packet buffer when we set error message string. 2000-11-21 13:50:25 +00:00
itojun 9b1ccfd10e handle getnameinfo error properly 2000-11-21 13:39:07 +00:00
christos 5135a422f1 Buffer overflow and environment passing fixes [originally inspired from
FreeBSD]. We really didn't need the environment fixes, but for the sake
of keeping the code as close as possible...
2000-11-19 20:17:39 +00:00
lukem 999fd3d617 - new ftpd.conf directives:
maxfilesize	set the maximum size of uploaded files
	sanenames	if set, only permit uploaded filenames that contain
			characters from the set "-+,._A-Za-z0-9" and that
			don't start with `.'

- new/changed command line options:
	-e emailaddr	define email address for %E (see below)
	-P dataport	use dataport as the dataport (instead of ctrlport-1)
	-q		use pid files to count users	[default]
	-Q		don't use pid files to count users
	-u		write entries to utmp
	-U		don't write entries to utmp	[default]
	-w		write entries to wtmp		[default]
	-W		don't write entries to wtmp

	  NOTE:	-U used to mean `write utmp entries'. Its meaning has changed
		so that it's orthogonal with -q/-Q and -w/-W. This isn't
		considered a major problem, because using -U isn't going to
		enable something you don't want, but will disable something
		you did want (which is safer).

- new display file escape sequences:
	%E	email address
	%s	literal `s' if the previous %M or %N wasn't ``1''.
	%S	literal `S' if the previous %M or %N wasn't ``1''.

- expand the description of building ~ftp/incoming to cover the
  appropriate ftpd.conf(5) directives (which are defaults, but it pays
  to explicitly explain them)

- replace strsuftoi() with strsuftoll(), which returns a long long if
  supported, otherwise a long

- rework the way that check_modify and check_upload are done in the yacc
  parser; they're merged into a common check_write() function which is
  called explicitly

- merge all ftpclass `flag variables' into a single bitfield-based flag element

- move various common bits of parse_conf() into a couple of macros

- clean up some comments
2000-11-16 13:15:13 +00:00
itojun 0a52851e32 we can assume presense of getaddrinfo.
use NI_MAXHOST for the hostname buffer used with getnameinfo.
2000-11-15 04:07:07 +00:00
lukem f62aa6c8ac changes to improve portability:
* replace union sockunion {} with struct sockinet {}, and modify the code
  accordingly. this is possibly more portable, as it doesn't rely upon
  the structure alignment within the union for our own stuff.  uses local
  su_len unless HAVE_SOCKADDR_SA_LEN is defined (set ifdef BSD4_4)
  (XXX: haven't tested the ipv6 stuff)
* always use getaddrinfo() and getnameinfo() instead of maintaining two code
  paths. (lukemftpd will provide replacements for these on older systems)
* use lockf() instead of open(.., O_EXLOCK) to lock the pid file
* minor KNF
* clean up long long support: create helper #defines and use as appropriate:
        #define		NO_LONG_LONG	! NO_LONG_LONG
        -------		------------	--------------
        LLF		"%ld"		"%lld"
        LLFP(x)		"%" x "ld"	"%" x "lld"
        LLT		long		long long
        ULLF		"%lu"		"%llu"
        ULLFP(x)	"%" x "lu"	"%" x "llu"
        ULLT		unsigned long	unsigned long long
        STRTOLL(x,y,z)	strtol(x,y,z)	strtoll(x,y,z)
2000-11-15 02:32:30 +00:00
perseant 9683b76b99 Try to prevent running more than one active cleaner on a filesystem at a time.
Let lfs_cleanerd record its pid in /var/run like other daemons.  Make
mount_lfs not start another cleaner when updating the mount, unless it is
being upgraded from read-only to read-write; when downgrading to read-only,
kill the cleaner using the recorded pids.
2000-11-13 22:12:49 +00:00
itojun b55bfbac42 correct result code on invalid port number against EPRT. 2000-11-13 15:11:57 +00:00
itojun d9ff63c241 plug memory leak 2000-11-13 11:52:41 +00:00
itojun 1e256e9927 - improve RFC2428 conformance.
return 522 on unknown protocol identifier on EPRT.
- clarify EPSV/EPRT/LPSV/LPRT behavior.
- repair memory leak and lack of boundary check on EPRT.
- make sure we do not resolve DNS on EPRT.
sync with kame.
2000-11-13 11:50:46 +00:00
perseant d5e76bbac2 Don't hold every segment that is being cleaned in memory in its entirety;
instead, if the segment doesn't have many live blocks, copy them to a
more appropriately sized chunk of memory and release the original.

This should prevent the cleaner from distending itself when cleaning many
segments with only one or two live blocks each, as when using the "-b" option.
2000-11-11 22:40:13 +00:00
mycroft 0581ae5bad Make ldd(1) build again. 2000-11-10 23:53:04 +00:00
mycroft 2d376bed2b When dlopen()ing with RTLD_GLOBAL, also make dependent libraries RTLD_GLOBAL. 2000-11-10 21:31:30 +00:00
simonb ae2c9c22f1 Fix linked-list botch with sysctl-based library selection that meant
only the last line was used.  Allow more than one white space character
between fields.

Reviewed by Christos Zoulas.
2000-11-10 18:19:06 +00:00
simonb 6e63b39fc6 Only need to include <sys/sysctl.h> once. 2000-11-09 23:14:21 +00:00
itojun 7b0d3f1d84 do not refer free'ed memory region. KAME PR 302 from ryo@iij.ad.jp 2000-11-09 01:04:14 +00:00
hubertf dca9c22e0c in SEE also, xref newfs_lfs(8), sort entries and seperate by "," 2000-11-08 19:45:08 +00:00
lukem 9fe3074a12 provide obvious example of line syntax 2000-11-07 07:02:18 +00:00
lukem 674d9fad57 slight cleanup of line syntax 2000-11-07 07:01:54 +00:00
lukem c96b945602 slight rework 2000-11-07 06:58:08 +00:00
lukem 1ae178427f reorganise slightly to make it more obvious what the actual syntax of
a configuration line is.
2000-11-07 06:51:13 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
perseant d9cc43d8a3 Fix memory leak described in PR #11094 (patch from Jesse Off
<joff@gci-net.com>).
2000-11-03 17:52:55 +00:00
mycroft 9ee3432bb9 In dlopen(), use the main program's library search path, to match semantics of
other systems (and our ELF).
2000-10-29 13:11:38 +00:00
garbled 1403ef3b87 Remove direct calls to "make" and replace with ${MAKE} 2000-10-26 05:52:54 +00:00
dogcow 90c3bfc9b0 defs had 'short block' for blocksize; changed defs to be unsigned.
added note to tftpd.8 that this bug hits multiple tftp clients.
2000-10-18 01:35:45 +00:00
simonb 9b22175a26 Remove INSTALLFLAGS=-fschg, as per change to usr.bin/ssh/ssh/Makefile. 2000-10-18 00:24:18 +00:00
tv 7781da70d5 Formatting nit: add a space. 2000-10-17 20:55:36 +00:00
dan d173359000 format warning fixes from he, after testing on 64-bit elf (alpha) 2000-10-11 20:46:07 +00:00
is 48052d04a3 Format string cleanups by sommerfeld. 2000-10-10 19:54:37 +00:00
itojun 4a32e44ffe make sure big_buf is big enough to hold line terminations.
if all the lines have N_CHARS of characters, we will write up
	N_CHARS * N_LINES + (3 + 2 * N_LINES) + 1
of bytes.
2000-10-10 12:38:54 +00:00
bjh21 d657c604d0 Clean-up of grotty SCCS workaround. It's now almost not grotty at all.
This is the last part of PR bin/10049.
2000-10-08 16:08:56 +00:00
bjh21 c10e667637 Don't run over the end of the banner buffer if it ends with '%'.
From PR bin/10049
2000-10-08 16:04:02 +00:00