Commit Graph

1476 Commits

Author SHA1 Message Date
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
mjl 7627a9213f Un-__P and ANSIfy. 2000-10-04 18:52:50 +00:00
mjl e88c38cfda No \n in syslog messages.
_exit(-1) -> _exit(1).
2000-10-04 18:24:03 +00:00
jdolecek ca98463029 call setlogin() before dropping root privileges, so that process
would have correct p_login value
2000-09-28 17:49:06 +00:00
mjl 4fdc259981 Use strlcpy/strlcat instead of strn* plus manual termination.
Use sizeof() instead of hardcoded length. Clean up NULL vs 0
confusion. sizeof(char) is 1, really.
2000-09-19 16:17:48 +00:00
eeh 45de780533 Wrong register in machine code description. 2000-09-16 14:04:30 +00:00
christos 0dec1c64f5 Make this compile again without -DINET6 and without get{addr,name}info(3)
This ftpd now compiles and runs on NetBSD/1.4.2 with:

CPPFLAGS+= \
    '-Dstrlcpy(a,b,c)=(strncpy(a,b,c),strlen(a))' \
    '-Dstrlcat=strncat' \
    '-Dsl_add(a,b)=(sl_add(a,b),0)'
2000-09-15 14:55:16 +00:00
fvdl d00dd9f9a0 Define INETD_SUPPORT 2000-09-13 11:30:41 +00:00
tron 23bf98f535 - Add "dependall" target so that "make build" will really uudecode the
"ld.so" binaries for i386 and sparc.
- Remove bogus "${DESTDIR}/" from "FILESDIR".
2000-09-12 16:39:51 +00:00
fvdl 3b36dc8408 Add uuencoded binaries for a.out dynamic loaders on i386 and sparc,
who are ELF now. Needed because cross-building them is still a
problem. These loaders will try /emul/aout first, but do not
have the baggage that COMPAT_AOUT has.
2000-09-11 23:23:21 +00:00
joda c5dc92d1e3 install manpage 2000-09-10 19:57:30 +00:00
perseant 9c7f8050f4 Various bug-fixes to LFS, to wit:
Kernel:

* Add runtime quantity lfs_ravail, the number of disk-blocks reserved
  for writing.  Writes to the filesystem first reserve a maximum amount
  of blocks before their write is allowed to proceed; after the blocks
  are allocated the reserved total is reduced by a corresponding amount.

  If the lfs_reserve function cannot immediately reserve the requested
  number of blocks, the inode is unlocked, and the thread sleeps until
  the cleaner has made enough space available for the blocks to be
  reserved.  In this way large files can be written to the filesystem
  (or, smaller files can be written to a nearly-full but thoroughly
  clean filesystem) and the cleaner can still function properly.

* Remove explicit switching on dlfs_minfreeseg from the kernel code; it
  is now merely a fs-creation parameter used to compute dlfs_avail and
  dlfs_bfree (and used by fsck_lfs(8) to check their accuracy).  Its
  former role is better assumed by a properly computed dlfs_avail.

* Bounds-check inode numbers submitted through lfs_bmapv and lfs_markv.
  This prevents a panic, but, if the cleaner is feeding the filesystem
  the wrong data, you are still in a world of hurt.

* Cleanup: remove explicit references of DEV_BSIZE in favor of
  btodb()/dbtob().

lfs_cleanerd:

* Make -n mean "send N segments' blocks through a single call to
  lfs_markv".  Previously it had meant "clean N segments though N calls
  to lfs_markv, before looking again to see if more need to be cleaned".
  The new behavior gives better packing of direct data on disk with as
  little metadata as possible, largely alleviating the problem that the
  cleaner can consume more disk through inefficient use of metadata than
  it frees by moving dirty data away from clean "holes" to produce
  entirely clean segments.

* Make -b mean "read as many segments as necessary to write N segments
  of dirty data back to disk", rather than its former meaning of "read
  as many segments as necessary to free N segments worth of space".  The
  new meaning, combined with the new -n behavior described above,
  further aids in cleaning storage efficiency as entire segments can be
  written at once, using as few blocks as possible for segment summaries
  and inode blocks.

* Make the cleaner take note of segments which could not be cleaned due
  to error, and not attempt to clean them until they are entirely free
  of dirty blocks.  This prevents the case in which a cleanerd running
  with -n 1 and without -b (formerly the default) would spin trying
  repeatedly to clean a corrupt segment, while the remaining space
  filled and deadlocked the filesystem.

* Update the lfs_cleanerd manual page to describe all the options,
  including the changes mentioned here (in particular, the -b and -n
  flags were previously undocumented).

fsck_lfs:

* Check, and optionally fix, lfs_avail (to an exact figure) and
  lfs_bfree (within a margin of error) in pass 5.

newfs_lfs:

* Reduce the default dlfs_minfreeseg to 1/20 of the total segments.

* Add a warning if the sgs disklabel field is 16 (the default for FFS'
  cpg, but not usually desirable for LFS' sgs: 5--8 is a better range).

* Change the calculation of lfs_avail and lfs_bfree, corresponding to
  the kernel changes mentioned above.

mount_lfs:

* Add -N and -b options to pass corresponding -n and -b options to
  lfs_cleanerd.

* Default to calling lfs_cleanerd with "-b -n 4".


[All of these changes were largely tested in the 1.5 branch, with the
idea that they (along with previous un-pulled-up work) could be applied
to the branch while it was still in ALPHA2; however my test system has
experienced corruption on another filesystem (/dev/console has gone
missing :^), and, while I believe this unrelated to the LFS changes, I
cannot with good conscience request that the changes be pulled up.]
2000-09-09 04:49:54 +00:00
garbled f0b8e397bf Change "Apart form" to "Apart from". 2000-09-04 06:39:03 +00:00
scottb b5de616825 copy the real object filename to the rtld object path so that the
Dl_info structure can be properly filled by dladdr().
2000-08-28 04:15:54 +00:00
mjl 8895a2f9a6 Use sockaddr_storage.
Use correct var for strncpy length.
2000-08-22 16:42:37 +00:00
itojun 697db6345c make error case handling in -daemon case meet with other portion of the code.
(use fprintf-then-exit, not errx - costmetic)
2000-08-18 03:25:52 +00:00
msaitoh b0d71b5f83 remove extra period 2000-08-14 12:16:45 +00:00
matt 1ed7963458 Simplify some stuff. 2000-08-07 01:47:04 +00:00
thorpej 2bcae16fa3 hprop(8) belongs in /usr/sbin, not /usr/libexec. 2000-08-06 20:42:22 +00:00
thorpej f975168682 The Kerberos KDC belongs in /usr/sbin, not in /usr/libexec. 2000-08-06 19:31:24 +00:00
veego 74c5ec3832 We now have to link with -lutil to get pidfile(3). 2000-08-06 19:24:15 +00:00
assar 4bb88e6fb1 forced: previous was really: remove libvers, it's not being used 2000-08-03 22:58:32 +00:00
assar fc90224f06 link against the not-installed libvers 2000-08-03 22:47:37 +00:00
assar 549a4d9cdc update build infrastructure for heimdal 0.3a 2000-08-03 04:02:29 +00:00
martin a140a79b5c Fixed s/key compile bug. 2000-07-29 08:20:02 +00:00
lukem acd8ab456a wtmp is in /var/log not /var/run ... 2000-07-28 12:54:01 +00:00
kleink fb21fd7a91 Adjust a comment after the Great Renaming. 2000-07-27 10:44:39 +00:00
mycroft 94581370f5 The ELF ABI declares that argc must fill an `argument slot'. Make it so.
For __sparc_v9__ only, do a hack to make executables work temporarily before
and after the kernel is switched.
2000-07-26 15:40:07 +00:00
lukem 8a5b724529 add support for -W; don't log to wtmp (orthogonal of -U which logs to utmp).
inspired by similar option in wuftpd.
2000-07-26 13:53:33 +00:00
lukem 0b392afc69 document /var/run/[uw]tmp, /var/run/ftpd.pids-CLASS 2000-07-26 13:45:52 +00:00
mycroft 43cfeb27a9 Catch up with type changes. Also:
* Apply DT_PLTRELSZ to (one of) pltrel or pltrela *after* we've finished
  parsing the headers, so we know which one.
* Fix sparc64 bogons.  (It works now!)
2000-07-26 02:07:34 +00:00
lukem d85f3bb159 * make checkportcmd the default. this breaks third-party proxy ftp but
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-23 14:40:48 +00:00
thorpej a8248dcc27 Make it build on non-VARPSZ again. 2000-07-19 15:01:16 +00:00
eeh 55c1b7fb0d Fix some issues with SPARC V9 ELF binaries. 2000-07-18 22:33:55 +00:00
matt 824a084272 More VAX ELF changes. 2000-07-17 02:55:52 +00:00
lukem e3a2c5cc44 * add two new ftpd.conf(5) directives:
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-17 02:30:52 +00:00
lukem 4b70eef93f * add -H, which acts like -h `hostname`. (requested by kim@)
* refer to draft-ietf-ftpext-mlst-11 instead of -10
2000-07-15 03:45:19 +00:00
matt 63465d3193 No need for RELOCATE_SELF since the VAX does real PIC. Rewrite the bind
routine to deal with JMP .vs. CALLx differences.
2000-07-14 22:03:02 +00:00
matt 9118b9fe90 Split DEBUG into two lines to make it easier to enable each separately. 2000-07-14 22:01:09 +00:00
matt 72ed915502 Update to reflect VAX ELF reality. 2000-07-14 22:00:33 +00:00
matt cc5d6b2a4d Initialize ld.elf_so's textsize. 2000-07-14 21:59:58 +00:00
eeh 3cf5c2adbf Added support for the SPARC v9 ABI. 2000-07-13 23:14:17 +00:00
tron 7cae32ff49 Invoke "nroff" with "-S" (safer mode) option because "makewhatis" is
usually invoked by "root".
2000-07-13 06:45:22 +00:00
tron 714c921491 Kill "nroff" process and wait for its terminiation if we can't setup
the "libz" file handle.
2000-07-13 06:29:43 +00:00
tron b238c131ce Optimize invokation of "nroff":
- 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-13 06:15:03 +00:00
lukem 551a7c78c6 base64_encode(): separate out the special case for the last 2 bytes, and
be a bit safer with signed chars. per discussion with kre.
2000-07-10 22:41:17 +00:00
tron e6f40b0f96 Check exit code returned from "nroff" if it is used to convert
unformatted manual pages.
2000-07-10 08:11:31 +00:00
tron 93cb6f8300 Invoke "nroff" and parse its output if an unformatted manual page uses
macros. Fixes PR bin/9083 by Geoff C. Wing.
2000-07-09 23:07:14 +00:00
lukem 9968cfa298 - base64_encode(): fix garbled output due to fencepost error. output now
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-09 14:26:34 +00:00
lukem e2851fe6dc setproctitle(), and for any other printf variants, it is not a good idea
to pass variable directly like foo(x).  use foo("%s", x) to avoid misuse.
from: openbsd
2000-07-09 14:18:08 +00:00
sommerfeld eac5778e83 More -Wformat cleanups. 2000-07-09 02:24:30 +00:00
sommerfeld 6f0015c48f More format paranoia. 2000-07-08 18:24:28 +00:00
christos 910cd9b309 fix non-portable bit-fields 2000-07-06 03:16:51 +00:00
itojun d7dc7d22d1 setproctitle(), and for any other printf variants, it is not a good idea
to pass variable directly like foo(x).  use foo("%s", x) to avoid misuse.
from: openbsd
2000-07-05 22:15:04 +00:00
msaitoh f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
perseant f184685d10 cleaner changes corrseponding to kernel changes 2000-07-04 22:36:17 +00:00
matt 9bf906d2e1 Make things builds with GCC 2.96 2000-07-03 03:34:25 +00:00
matt 23bca583f4 shut gcc up about a bogus possibly used before initialized. 2000-07-03 03:33:52 +00:00
matt c72bbb2c51 Treat short and byte print formats as and cast to the right size. 2000-07-03 03:32:57 +00:00
matt 86d15d820b Update to current <machine/asm.h> 2000-07-03 03:31:47 +00:00
matt 5aa9ca0144 If OBJECT_FMT is ELF and MACHINE_ARCH = vax, build ld.elf_so 2000-07-03 03:30:52 +00:00
perseant 9a38f49c57 User-level changes corrseponding to my latest kernel changes.
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-03 01:49:11 +00:00
assar 231c9cbcf7 add man-pages for kf and kfd 2000-07-02 07:39:39 +00:00
mrg 8d4795719a remove include of <vm/vm.h> 2000-06-29 06:26:33 +00:00
mrg ad91bba6a6 we now need <uvm/uvm_param.h> 2000-06-26 15:37:26 +00:00
simonb dde4b6e5d0 Use LOGIN_NAME_MAX for sizing the mailname buffer. Allows usernames
longer than 8 characters to run jobs instead of aborting because
"File ... is in wrong format".
2000-06-25 13:32:34 +00:00
thorpej df83a2a3cd Add MK... variables to enable/disable various aspects of building
crypto support into the system.  See share/mk/bsd.README for more
a full description.
2000-06-23 06:01:10 +00:00
thorpej 5c099b14c1 Bring the telnet situation back into better shape. Specifically,
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-22 06:47:42 +00:00
perseant bbc8485d45 Make sure to segunmap segments on error in lfs_bmapv or lfs_markv. Prevents
a memory leak of by default 1 Mb per error.  May fix PR #9149.
2000-06-21 01:58:52 +00:00
lukem 327792f9ed fix problems noted by <dogcow@redback.com> in [bin/10390] and private email:
* 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-20 07:39:46 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
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-20 06:00:24 +00:00
lukem 13067569df rewrite method of traversing facttab[]; use size of list to terminate
not NULL terminated entry (since we need to know the size of other
reasons...)
2000-06-19 17:08:05 +00:00
lukem 73f082e2ea various fixes suggested by Robert Elz:
* 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-19 15:15:03 +00:00
thorpej dd5f430adf Fixup Heimdal libexec builds. 2000-06-16 23:41:40 +00:00
thorpej b4bbc15da4 Import libexec portions of Heimdal, from cryptosrc-intl. 2000-06-16 23:32:37 +00:00
explorer f8eb6433b2 include <krb5/krb5.h> before including extern.h, so krb5_context is defined 2000-06-16 23:17:41 +00:00
christos baeb94e0b1 Also set __mainprog_obj so .ini sections can call dlopen() 2000-06-16 19:51:05 +00:00
cgd db755e7c76 sweep of my licenses (userland files w/o only my copyright) for
consistency.  (no functional changes)
2000-06-14 17:24:02 +00:00
itojun 1e949e404d correct LPSV/LPRT display on STAT command.
(did not crank the version since the change is on the same day)
2000-06-14 13:55:15 +00:00
lukem a26448af43 major overhaul (just before netbsd 1.5 :-):
* 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-14 13:44:21 +00:00
cgd d220ca5ba3 fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
2000-06-14 06:48:47 +00:00
perry 79b8558eac include sys/sched.h to get definition of CPUSTATES 2000-06-04 01:38:52 +00:00
fvdl aefb080ff0 Subject to TI-RPC, followed by complete and utter ANSIfication. 2000-06-03 21:06:02 +00:00
fvdl 145ded3cdc Missed a pmap_unset -> rpcb_unset change. 2000-06-03 20:57:40 +00:00
fvdl 42f513b9d2 Adapt for TI-RPC. 2000-06-03 20:52:18 +00:00
fvdl 19e7dc6fee Use sockaddr_storage. 2000-06-03 20:37:37 +00:00
fvdl 5ce895dff6 Use sockaddr_storage in from_inetd check (call to getsockname()). 2000-06-03 20:36:30 +00:00
fvdl b3032caf2a Use sockaddr_storage in the call to getsockname, not sockaddr_in. 2000-06-03 20:35:06 +00:00
fvdl 6185360f34 Use TI-RPC, thus enabling IPv6. 2000-06-03 20:31:25 +00:00
fvdl e1d419e43a Use TI-RPC interface. ANSIfy. 2000-06-03 19:06:25 +00:00
fvdl 3ff53c6c24 ANSIfy function prototypes and definitions. 2000-06-03 18:58:22 +00:00
fvdl 1e12f48a81 Use rpcb_unset, not pmap_unset. 2000-06-03 18:48:24 +00:00
fvdl 015c3c107d Oops, remove debugging printf. 2000-06-03 18:43:10 +00:00
jdolecek 06d16ede1e slighly move the assert() added in last commit, so that it's
actually useful
2000-06-03 06:51:57 +00:00
fvdl ed2c47f74f Adapt for new RPC interface. 2000-06-02 23:20:18 +00:00
jdolecek 2a05365bbb _rtld_unref_dag(): needed->obj might be null if the unreffed object has
some unsatisfied references (most often when compiled without necessary
	-Wl,-R), so check for that instead of causing null-dereference;
	this way the code has a chance to cleanup after itself and report
	the error to caller

Thanks to Jason Thorpe for helping fix this!
2000-06-02 22:52:28 +00:00
explorer 6a07b80d26 make this compile with KERBEROS5 defined. Note: only one of KERBEROS or KERBEROS5 may be defined in this file... 2000-06-02 14:47:19 +00:00
fredb 5c0f4694d6 Make this build again with crypto-us, after recent changes to k{,5}login.c. 2000-06-02 00:19:04 +00:00
lukem 8f1cd9886e Clarify the meaning of `directive', as requested in [security/10229]
by Klaus Klein <kleink@uni-trier.de>
2000-05-30 23:53:37 +00:00
itojun bcae82da01 add comment on IPv4 mapped address twist 2000-05-30 05:31:31 +00:00
itojun 6fc49112e9 document IPv4 mapped address twists.
- ftp(1): treats IPv4 mapped destination as IPv4 peer, not native IPv6 peer.
  this does not support network with SIIT translator.
- rshd(8)/rlogind(8): rejects accesses from IPv4 mapped peer, to avoid
  possible abuse of IPv4 mapped addr (rshd/rlogind use source address-based
  auth so it is important to check the condition).
2000-05-30 05:21:46 +00:00
simonb 6c872090f0 The cp_time array has had 5 members since 1994 - show them all in debug
output.
2000-05-29 11:30:30 +00:00
matt d7e8330189 Remove RELOC_SYMBOLICS_THROUGH_JMPSLOT as it's always the case 2000-05-28 01:53:05 +00:00
matt 03e56c691e Changes to put the COMPAT_AOUT code into ld.aout_so. Search <dir> for <lib>
then search /emul/aout/<dir> for <lib>.  To make sure we don't get false
postives on ELF libraries we make the .so is a ZMAGIC dynamic library.
2000-05-27 06:53:29 +00:00
matt 0189702cee minor fix now that i've defined the plt0 entry. 2000-05-22 19:17:04 +00:00
lukem 18be3cd981 - Always close(pdata) if it was a valid filedescriptor before setting it to -1.
Problem noted in [bin/9642] by Takahiro Kambe <taca@sky.yamashina.kyoto.jp>,
  (part of which already had been solved by itojun a while ago), and provided
  patch covered most of the fixes needed. (Thanks Takahiro!)
- Consistently indent goto labels by one space.
2000-05-20 23:34:55 +00:00
lukem dcc88422ad convert to ANSI C as per style guide 2000-05-20 02:20:18 +00:00
fair bfd08c6ef7 Deal with PR 9427 - add wording to clarify what sending SIGHUP to init(8)
does and does not do. Also, while we're here, make the list of flags more
readable.
2000-05-17 09:22:11 +00:00
itojun 6047a12c7b move IPv6 considerations into BUGS section 2000-05-16 00:59:12 +00:00
bjh21 6c97e2bd78 Initial commit of arm26 port 2000-05-09 21:55:44 +00:00
kleink e425e0a706 PowerPC: support ADDR16_LO, ADDR16_HI and ADDR16_HA relocations. 2000-05-01 11:41:08 +00:00
erh a497b0d8ab Cause ld.elf_so to find the symbols for __progname and environ and set them. If we wait until crt0 gets around to doing it it's too late for any library init functions. 2000-04-15 05:41:46 +00:00
christos 46d52e1ec5 re-indent sanely _rtld_dlsym() [no functional change] 2000-04-15 05:27:49 +00:00
itojun d53d7cf148 reject connection attempt from IPv4 mapped addr, for safety. 2000-04-14 12:29:49 +00:00
itojun 42a6c72320 reject conneciton attempt from IPv4 mapped address, just in case.
I thought of supporting it, however, rejected due to possible complication.
i prefer the safer side here... (code available, commented out)
2000-04-14 12:28:51 +00:00
soren 0b24ff5b31 Also print a newline after the error in the xwarnx case. 2000-04-02 23:04:32 +00:00
mycroft 3d5dc334de Don't try to get libc_pic from the libc compile directory. If we're doing a
build, libc has already been installed.
2000-03-26 21:55:55 +00:00
kleink 6138ff83d9 Document LD_PRELOAD, fixing PR lib/9663, and note that (and why) neither
this nor LD_LIBRARY_PATH are honored when executing set[ug]id.
2000-03-24 20:10:28 +00:00
lukem c8c9e77cbf only define _DEFAULT_CONFDIR if not set. (allows compile-time override) 2000-03-06 21:42:26 +00:00
lukem f318090c60 * don't bother with a version[] string, just use the macro as appropriate
* clean some more of the GLOBAL stuff
* fix unused var if -UHASSETPROCTITLE
2000-03-05 06:12:19 +00:00
aidan 492312b9ed Move include/kerberosIV/com_err.h to include/com_err.h 2000-02-14 03:26:06 +00:00
chs 871e0c1533 switch back to using a file mapping for the initial mapping of a new object.
this allows the kernel to use PMAP_PREFER() to give us better alignment on
platforms that care.
2000-02-13 04:28:09 +00:00
thorpej f8b76eb0fd Const poison dladdr(). 2000-02-11 00:07:36 +00:00
scottb 076e309d3e change first argument of dladdr to const. 2000-02-08 16:22:59 +00:00
scottb c0cf420b69 add hooks to support the dladdr function. 2000-02-07 21:40:40 +00:00
kleink 65b8f3b2eb Change _rtld_dlclose() to unload the object via _rtld_unload_object() rather
than by itself.  Besides being duplicated code the open-coded version
also did not take care of cleaning up after the object's DAG(!).
Fixes PR bin/8905.
2000-02-07 19:02:49 +00:00
assar f73a2b64ec (net_write): rename to telnet_net_write 2000-02-01 02:30:43 +00:00
itojun 2a5b88bffb IPv6 support. 2000-01-31 14:20:13 +00:00
tron 91e1f3f01b Don't write leading white spaces and directory names to whatis file. 2000-01-24 23:03:54 +00:00
itojun 6e6f6caf3e declare -DLOGIN_CAP in CPPFLAGS, not in CFLAGS. 2000-01-24 14:10:56 +00:00
veego 3764f5646b Disable the linking with X11 libraries.
No userland should be linked against X11.
2000-01-23 09:58:13 +00:00
mjl c47ddf604a Login.conf-ify rshd. Heavily inspired by FreeBSD. 2000-01-22 10:22:55 +00:00
mycroft f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
perseant d244493927 Take care of memory leaks 2000-01-18 08:02:30 +00:00
christos 3bc3e6f774 use xwarnx instead of warnx 2000-01-15 01:03:45 +00:00
ad 3090e2a588 Put RCS ID in the right place. 2000-01-14 02:11:54 +00:00
ad 6aa5f51487 - Either QVT/Term or the NT 'clipboard' converts tabs to spaces. I pasted in
some code via QVT/Term. Sigh. Fix it.
- Teeny KNF nit.
2000-01-14 02:10:08 +00:00
ad 3476632b59 Make 'if' capability from gettytab work. *shudder*. 2000-01-13 13:11:31 +00:00
lukem ab88a15086 suppress verbose messages from CWD and post-login if the first
character of the anonymous password is `-'.
2000-01-13 00:04:31 +00:00
lukem c8493e9499 * add ftpd.conf directive `portrange class min max', which allows specification
of the port range used by passive connections. based on work in [bin/9158]
  from Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
* change the way global variables are defined and extern-ed to be more
  consistent.
2000-01-12 22:39:27 +00:00
lukem 559037c273 fix problem where ftpd.conf lines would match everything if there was
no template defined. noted by Vebjorn Ljosa <ljosa@initio.no>
2000-01-10 08:03:50 +00:00
lukem 7e80378800 * new ftpd.conf directive:
template class [refclass]
  following directives for refclass will apply to class as well.
  this makes setting up a `template' class with many default settings
  easy, whilst allowing for class-specific overrides
* prevent crash when the optional limitfile wasn't given to limit
* document count_users()
* document default setting of limit in ftpd.conf(5)
* crank version
2000-01-09 10:08:45 +00:00
lukem 61ee60248e reference usr/share/examples/ftpd/ftpusers 2000-01-08 13:36:28 +00:00
lukem 584b0757f6 missing "." on reply 2000-01-08 11:14:36 +00:00
lukem 16e886121d features:
* add connection limits (`limit' keyword in ftpd.conf)
* move initialisation of curclass from parse_conf() to new function
  init_curclass()
* implement count_users(), which determines the number of users in a given
  class. a file - /var/run/ftpd.pids-<class> - is used to store a list
  of pids in use (effectively an array of pid_t's), and its size is reduced
  as necessary.
* new % modifiers in format_file:
	%c	class
	%M	maximum connection count
	%N	current connection count
* always end_login()s, even for refused connections

bugs fixed:
* remove \n from %T output
* fix some inconsistencies in the man pages
* ensure that both `ftp' *and* `anonymous' are allowed in ftpusers.
  (this was accidently broken in a recent commit to be ``or'' not ``and'')
* use MAXPATHLEN not MAXPATHLEN+1
* crank copyright date on modified files
* crank version
2000-01-08 11:09:56 +00:00
ad 93f5a68033 Oops, fix previous. 2000-01-04 13:51:55 +00:00
ad 2a1297db0c Add two new capabilities to gettytab - idea from FreeBSD:
al - user to auto-login as
  if - banner file to display, like /etc/issue
2000-01-04 13:43:36 +00:00
tron e9a72ad0a3 Accept all kind of whitespaces when searching for the end of a nroff
macro.
1999-12-31 14:50:16 +00:00
tron 3434166ef3 Correct and improve nroff macro stripping. Partially fixes PR bin/9083
by Geoff C. Wing.
1999-12-31 14:28:03 +00:00
tron 18c5f3d5f1 Abort if memory for execv(2) argument array cannot be allocated instead
of passing an array with incomplete contents to login(1).
Fix provided by Jun-ichiro itojun Hagino in PR bin/9082.
1999-12-31 12:42:35 +00:00
itojun 602b7d0407 indentation fix. 1999-12-31 08:01:26 +00:00
christos 3856850e36 don't stutter when printing error messages. 1999-12-27 15:36:36 +00:00
lukem d56fffdd70 * document all classtype defaults
* xref /usr/share/examples/ftpd/ftpd.conf
1999-12-26 09:42:18 +00:00
lukem 019b95b641 crank version 1999-12-21 12:57:45 +00:00
lukem 5c024702df * add support for optional groupglob in ftpuser entry. the syntax is now:
userglob[:groupglob][@host] [directive [class]]
* append ``(class: CLASSNAME, type: TYPE)'' to the syslogged login messages
1999-12-21 12:56:15 +00:00
lukem 80ca00b8cd trivial simplification 1999-12-21 12:52:18 +00:00
christos b360d70cb7 PR/9031: Scott Ellis: Ignore empty sysctl directive lines. 1999-12-20 02:43:58 +00:00
lukem 7543b77a8e * add back support for `-h hostname'; it still may be useful to override
the name advertised to the client, even if ftpd can determine it from
  the ip address that ftpd is bound to. requested by mrg.
* remove -4/-6; they were effectively no-ops since itojun's change in 1.75.
* crank version
1999-12-19 00:09:31 +00:00
lukem 6eff1df26e deprecate -h hostname in favour of automatic determination of local hostname.
this is a much cleaner solution for supporting multihomed virtual servers.
from Geoff C. Wing <gcw@pobox.com> in [bin/8137].
1999-12-18 06:33:54 +00:00
lukem 8aad99ce9d * move version to separate header file
* use .Dv and .Tn in the man pages as appropriate
* KNF a bit

The following were inspired by similar changes in openbsd, but may
have additional improvements by me:
* add more check_login tests to the parser rules
* nuke a few memory leaks in the parser rules
* clear passwords before free()ing them, for safety
* don't display \r\n in setproctitle() output
* add support for -U, which enables managing /var/run/utmp entries for
  connections. solves [bin/2217] by Jason Downs <downsj@teeny.org>
* fix oob handling for STAT command
* use SIG_ERR instead of -1
1999-12-18 05:51:34 +00:00
lukem b5972a49fe install ftpusers(5) as ftpchroot(5). more cleanups 1999-12-16 07:05:18 +00:00
lukem 6a0bdfee15 crank version 1999-12-16 07:01:23 +00:00
lukem 4f181f8249 cleanup 1999-12-16 06:56:49 +00:00
itojun 2c4f20dd99 do not touch __ss_len directly, they are not supposed to be touched. 1999-12-16 06:00:24 +00:00
lukem e11b8f48c5 * add support for `-h hostname', which defines the hostname to advertise
as (useful for virtual ftp servers in conjunction with inetd.conf(5)'s
  ability to bind to a specific address).
  if this option is used, add `hostname' to the syslog messages.
* improve documentation of command-line options
* don't allow class names of `all' or `none' in ftpusers
1999-12-16 02:21:37 +00:00
lukem 6be4a7c9bd separate ftpd.conf(5) and ftpusers(5) out from ftpd(8).
xxx: still needs a bit of work
1999-12-16 01:16:04 +00:00
christos 4374b52ab0 make a debugging formatting statement work portably 1999-12-15 20:13:31 +00:00
drochner d46a0af8c3 add one byte to the username character array and make sure the string
passed to "login" is '\0'-terminated
1999-12-15 17:41:48 +00:00
christos f0e72d450d Do what the people want. Support full sysctl names. 1999-12-15 05:22:37 +00:00
itojun 0ad375dcca do not perform setsockopt(IP_TOS) on mapped connections (IPv4 connection
toward AF_INET6 socket).
1999-12-13 16:30:37 +00:00
christos 75bdf8c379 indent properly a debugging statement and fix grammar. 1999-12-13 10:47:38 +00:00
christos aa594cf123 For the benefit of ldd and debuggers, append more Needed_Entry elements
if the library transformation attached more than one element.
1999-12-13 09:22:52 +00:00
christos ea816c78b2 Enable parsing and mapping of hardware dependent libraries in ld.so.conf
To be documented in the man page.
1999-12-13 09:09:34 +00:00
itojun 6beb13746b avoid use of s6_addr32, as it is non-standard.
(sync with KAME)
1999-12-13 04:36:10 +00:00
lukem 21d03121d3 * change format of /etc/ftpusers lines from
userglob [allow|deny]
  to
	userglob[@host] [allow|deny  [classname]]
  where class is a userdefined classname.
  - if host is given it may either be a CIDR address (e.g, `1.2.3.0/24') or a
    hostglob (e.g, `*.foo.com'), and the remote host is matched against that.
  - if classname is given, use that to match entries in ftpd.conf (defaults
    to `guest' for `anonymous'/`ftp' logins, `chroot' for users found in
    /etc/ftpchroot, and `real' for everyone else.

* implement new /etc/ftpd.conf directives:
    classtype classname type	set type of classname to GUEST, CHROOT, or REAL
    motd classname file		file to use instead of /etc/motd
    rateget classname rate	set rateget throttle to rate
    rateput classname rate	set rateput throttle to rate
    upload classname		allow/deny uploads (STOU, STOR, APPE). if
				denied, also acts as `modify deny'.

* implement new `SITE' commands:
    RATEGET	as per /etc/ftpd.conf rateget, but cannot exceed that
    RATEPUT	as per /etc/ftpd.conf rateput, but cannot exceed that

* implement format_file(), which outputs a file to the user, parsing %
  escapes. use to print /etc/ftpwelcome, /etc/motd, and the `display' file.

* implement strsuftoi() (from ftp(1)), which parses a number and
  optional suffix (for use with rateget, etc)

* don't bother seteuid(0) ; bind(...) ; seteuid(pw->pw_uid), since
  we don't need reserved ports (at wasn't getting them anyway).

* update & reorder copyrights

* use strlcpy() as appropriate
1999-12-12 14:05:54 +00:00
tron a0ed22ea5f Recognize manual page sections "l" and "n" used by the package system.
This fixes PR bin/8977 by Thilo Manske.
1999-12-11 20:30:30 +00:00
itojun 5d10f3e8c1 close pdata when it is kept opened till call to {,long_}passive(). 1999-12-09 11:18:05 +00:00
itohy 69c745c3d5 Use "addend" for R_68K_GOT32, R_68K_PC32, and R_68K_32 relocations.
I'm not sure whether R_68K_GOT32 relocations appear in shared
objects, though....

Example:
	lea	%pc@(got+0x1234@GOTPC),%a0	| R_68K_GOT32
	bsrl	foo+0x5678			| R_68K_PC32
	lea	bar+0x9abc,%a1			| R_68K_32
1999-12-08 08:47:10 +00:00
lukem 397e2cfc53 * change ftpd_popen() to take char *argv[] instead of char *cmd.
the string tokenisation must be performed by the caller (which is
  generally easy because it's almost always a static command).
* change do_conversion() to return a char *argv[] instead of char *cmd.
  tokenisation of the command is done internally.
* change retrieve() to take char *argv[] instead of char *cmd.
  (to take advantage of the above changes).  fixes [bin/8173]
* use fparseln() instead of fgetln()
* store conversions in listed order (rather than reverse order)
* use stringlists instead of handrolling code to manage an argv.
1999-12-07 05:30:53 +00:00
fredb d37aed91fb More CL* fallout. 1999-12-05 18:36:25 +00:00
pk c3f48a34ce No need for <varargs.h> here. 1999-11-29 10:59:02 +00:00
itohy aae2a80e54 Use <link_aout.h> instead of <link.h>
for the benefit of building a.out (cross) ld on ELF platforms.
Suggested by Minoura Makoto.
1999-11-29 08:27:07 +00:00
lukem d51504eeb3 check return val of sl_init() and sl_add() 1999-11-28 04:38:41 +00:00
enami 82d7115cf2 Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
kristerw b224e66b3a Spelling 1999-11-18 19:07:48 +00:00
thorpej 3bf43967ff Name consistencty nit: curmark -> _rtld_curmark 1999-11-10 18:48:19 +00:00
thorpej 70e2953dac Some slight cosmetic cleanup. 1999-11-10 18:34:49 +00:00
perseant fcb8440e38 If the child cleaner dies repeatedly without doing anything, give up. Uses
similar logic to inetd to identify such looping.
1999-11-09 20:33:37 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
perseant 2750b8620f Make datobyte do its arithmetic explicitly in 64 bits, so that segments
beyond the first 2G of disk can be cleaned.
1999-11-09 01:06:39 +00:00
mycroft bbe4b07983 Make this more likely to compile with ld.elf_so changes. (But this is
untested.)
1999-11-07 08:08:15 +00:00
mycroft 4bbb8dc9fb Make this more likely to compile with ld.elf_so changes. (But this is
untested.)
1999-11-07 08:01:51 +00:00
mycroft 7ea23adf34 More fallout. 1999-11-07 06:48:21 +00:00
mycroft 4b9f2ff9e0 Fix fallout from MD ld.elf_so changes. 1999-11-07 06:41:49 +00:00
mycroft 305c949781 Changes from msaitoh to fix local/global symbol confusion, and to fix weak
symbol support -- updated by me for elf.h changes.
1999-11-07 00:21:12 +00:00
erh 6752f572d8 Remove ELFNAME defines since they are defined in sys/exec_elf.h 1999-11-04 02:00:17 +00:00
simonb d10f49f606 More SVR4-style ELF cleanups. 1999-10-28 23:58:21 +00:00
tsubai 64ac9d7bdb Revert to rev. 1.4. This file didn't need to change. 1999-10-28 09:50:07 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
hannken 222397ee58 Undo last change. While these macros are defined in exec_elf.h, they are
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:39:16 +00:00
hannken db05621dec Undo last change. While these macros are defined in exec_elf.h, they are
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:30:08 +00:00
erh b11baa5513 Remove ELFNAME macros which are already defines in exec_elf.h 1999-10-21 21:15:04 +00:00
itohy 6fa7d72ce5 Make __SVR4_ABI__ optional. 1999-10-18 03:26:53 +00:00
perseant 64846ce5dc Don't complain that we can't fstat the Ifile, if it's because the filesystem
has been unmounted.  (I.e., don't give errors every time an LFS is unmounted.)
1999-10-07 18:26:58 +00:00
tron e93ada44ca Don't use undefined C expression. Patch supplied by David A. Holland
in PR bin/8534.
1999-10-04 17:36:52 +00:00
tron 85154d3f2a Avoid segmention fault if there is an empty line in "/etc/ftpusers".
Problem noted by Emmanuel Dreyfus in PR bin/8504.
1999-09-30 18:12:34 +00:00
soren 30d18a154c Remove extraneous colons and newlines from perror(3) arguments. 1999-09-30 12:35:52 +00:00
kleink 429c156c10 Need <sys/param.h> for MAXHOSTNAMELEN. 1999-09-26 10:08:43 +00:00
tron 9cc91f68f9 Set file modes of whatis.db database file to 444 like the old script did. 1999-09-25 21:40:58 +00:00
tron a834c2ce72 Fix incorrect error check after writing database file. 1999-09-25 21:25:55 +00:00
tron ceb9bcabf8 Replace shell script for creating whatis.db database with a C program
which is a little bit faster.
1999-09-25 21:17:37 +00:00
sommerfeld 722a6b762d Fix PR8428: no longer truncate login name to 8 characters, since
NetBSD supports longer login names now.
1999-09-24 17:59:27 +00:00
aidan d4403adecd Kerberos5 ticket forwarding works. 1999-09-17 19:00:32 +00:00
chs 21eedb0ec1 the PMAP_NEW option is gone as the new interface is no longer optional. 1999-09-12 01:19:23 +00:00
simonb 1484ad8872 In the command table, remove a trailing comma and make white space
consistant.
1999-09-06 06:01:44 +00:00
itojun b59b162709 ftpd(8): Copy sin6_scope_id from control connection to active data
connection destination, hoping this to help ftpd's behavior with
scoped IPv6 addresses.
I'm not sure if it is the right way, but it is the best way available to us.
LPRT or EPRT command gives no information about which interface (or scope)
to be used for new data connection.

ftp(1): On data connection establishment, warn if scoped address is used.
If peer (ftp daemon) does not handle scoped address, data connection
may not work right.

This seems to be sort of protocol spec hole, not implementation issue.
1999-09-01 05:03:41 +00:00
christos cee9ac24ad more kerberos5 fixes 1999-08-25 20:07:33 +00:00
christos a4c5e0c550 Make this compile with krb5. 1999-08-25 16:23:52 +00:00
perseant 193a2fa9f0 Remove partial-segment timestamp optimization from lfs_segmapv. If "time"
is not monotonically increasing (e.g. clock is slaved to another system)
the optimization will result in segments being treated as corrupt
(uncleanable).  If enough such "bad" segments were created, the cleaner would
clean continuously, and after some time the system would panic with "no
clean segments".

(Legitimately old partial-segments are relatively rare, and will have their
blocks culled by lfs_bmapv.)
1999-08-25 00:14:13 +00:00
kleink 83265a56f2 Bump text alignments to 4 bytes. 1999-08-23 09:13:25 +00:00
matt 741f18b695 Initial VAX ELF32 support (mostly untested). It's checked primarily for
testing and archival for now.  I don't expect anyone to work with it
since the binutils and gas changes are still pending.  But you got to
crawl before you walk.
1999-08-21 19:26:18 +00:00
christos 46cd6f2aad reflect reality 1999-08-20 21:12:47 +00:00
christos 2f37f42366 fix typo 1999-08-20 21:10:27 +00:00
christos fb292d7f02 enable /etc/ld.so.conf processing
[reviewed by thorpej]
1999-08-19 23:42:15 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
aidan b7519caaf7 Added kerberos5_cleanup() to cleanup if KRB5 defined. This is to destroy
a forwarded ccache on cleanup.
1999-08-12 23:05:22 +00:00
aidan 47ea8c31ac added reference to bsd.crypto.mk to Makefile. whoops. 1999-08-09 22:46:16 +00:00
aidan e1438c8ef3 libexec now reaches over into ${CRYPTOPATH} for additional SUBDIRs. 1999-08-06 22:49:06 +00:00
thorpej 5c5817ee4a When allocating the entire address space of an object, map an anonymous
region first (using the data/bss protection) covering it, then overlay
the text and data regions at the appropriate offsets within the region,
and then unmap any gap between the text and data.

The previous method of maping the entire address space with the actual
file object itself is incorrect, as it may extend past the end of the
file if the section alignment is large enough.

This bug was the source of the libposix failure on the SPARC and another
similar failure (with libc!) on the Alpha (failure was accompanied by
a "uvn_io: size check fired" message on the console).
1999-08-06 22:33:49 +00:00
hubertf 0baca35ee5 Document setup of "ftp-only" non-anonymous accounts.
Suggested by Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>,
approved by Luke Mewburn <lukem@netbsd.org>
1999-08-02 00:44:59 +00:00
kleink 1cc052ce00 Rearrange the shared library search path precedences to LD_LIBRARY_PATH >
runpath > built-in default; this is the behaviour of the SVR4 shared loader,
and gives users the opportunity to override the runpath.  (Addresses a report
on current-users by John Kohl.)
1999-08-01 19:47:07 +00:00
itojun 542bd3ceb5 handle IPv4 TCP control connection, toward AF_INET6 socket.
this happens when you have the following line in inetd.conf,
but not with tcp4 line:
>>>ftp  stream tcp6 nowait root /usr/libexec/ftpd ftpd -ll
1999-07-27 15:41:49 +00:00
thorpej 4d256c199f When dlopen()'ing a shared object without an absolute pathname, search
for it in the rpath of the main program as well as the path specified
in LD_LIBRARY_PATH.
1999-07-22 00:18:19 +00:00
mrg 51a96a002f optionally include CRYPTOPATH Makefile.frag files. 1999-07-20 09:35:18 +00:00
thorpej a3281f7249 Use bsd.crypto.mk. 1999-07-12 22:04:09 +00:00
itojun f745df9885 add line break. 1999-07-12 20:25:35 +00:00
itojun 47b0e5ff1d IPv6 support. 1999-07-12 20:17:09 +00:00
itojun 12fc4fc055 more sanity check on LPRT. 1999-07-11 20:09:23 +00:00
itojun e983200c64 make LPRT on IPv4 work.
make LPSV on IPv6 work.
1999-07-11 20:03:41 +00:00
thorpej b4da0f0b3c Nuke some whitespace. 1999-07-11 03:04:14 +00:00
thorpej 580c3519b7 Put the RCS ID in the correct place. 1999-07-11 03:00:07 +00:00
christos 6b709e3d6d use syslog instead of fprintf, otherwise no-one will see the error 1999-07-06 14:36:10 +00:00
thorpej 206408b533 Protect certain definitions from view by crt0, by wrapping them in
#ifdef _RTLD_SOURCE.

Should fix the "variable page size" build error of crt0 on the SPARC.
1999-07-05 17:55:34 +00:00
itojun 3496d3aba4 close data socket when new EPRT command comes. 1999-07-02 07:11:36 +00:00
itojun 5b5d822bce dual-stack telnetd. 1999-07-02 06:32:08 +00:00
itojun 7b9f155e5f dual-stack fingerd. Run it from inetd like:
>>finger  stream tcp6 nowait nobody /usr/libexec/fingerd fingerd

Single daemon on tcp6 socket will be able to serve both IPv4 and
IPv6 connections, while you can run both if you wish.
1999-07-02 06:00:06 +00:00
itojun 2005cef66b typo fix: s/LPSV/LPRT/ 1999-07-02 05:54:21 +00:00
itojun c9b3e3ad3d dual-stack ftpd. run this from inetd, like:
>>ftp  stream tcp6 nowait root /usr/libexec/ftpd ftpd -ll
1999-07-02 05:52:14 +00:00
ragge f4d411a4a4 Make longjmp work with dynamic linking. From Matt Thomas.
Fixes PR#7671.
1999-06-28 17:28:56 +00:00
danw ac6b97b984 Remove the .ifdef to compile without optimization on powerpc since the
bug that it was working around doesn't seem to exist in egcs
1999-06-26 20:01:55 +00:00
carrel 97c1b3499a If opening files for writing, be sure to truncate. 1999-06-23 15:41:48 +00:00
christos 00e5621847 We need to compile with -DVARPSZ, because the sparc has a variable page
size depending on arch. Make it an error to compile without it. This
caused -lposix linked programs to fail.
1999-06-22 16:28:22 +00:00
thorpej 3787c5c3d8 MAP_COPY -> MAP_PRIVATE 1999-06-17 21:09:47 +00:00
tron cf71eb8d35 Correct wrong conversion specifications in calls to syslog(3). 1999-06-16 16:34:29 +00:00
kleink 8788923e6a Turn bool, true and false into an enumeration and enumeration constants to
avoid integer promotion warnings.
1999-06-16 15:41:24 +00:00