Commit Graph

1356 Commits

Author SHA1 Message Date
christos 7ddeec7d69 s/warn/xwarnx/ cuts down size by 50% by not pulling in stdio. 2001-05-27 23:26:47 +00:00
kristerw 1571b4e91f Initialize a pointer needed when expanding the %C "display file escape
sequence".
2001-05-25 23:40:25 +00:00
christos 21d58e7713 Provide compatibility for the NetBSD-1.5 branch. Note that I used
__NetBSD_Version__ instead of checking if the macro was not already
defined.
2001-05-24 17:42:48 +00:00
christos cb12da02ff Don't include <uvm/uvm_param.h>. It does not appear to be needed by anything.
<uvm/uvm_param.h> does not exist under 1.5.  Tested on i386 and sparc.
Anyway, if it is indeed needed by other platforms then we'll put it back,
but I don't see how since it does not define any types.
2001-05-24 17:41:42 +00:00
christos f8ad0818e5 Unloading objects, can cause other objects whose reference count becomes
0 to be unloaded. Make sure that when we unload those objects we remove
any references to them from the globals list... This fixes SIGSEGV with
apache+mod_php+mysql.

XXX: This fix should be pulled up.

christos
2001-05-10 20:19:25 +00:00
he 9c2e1d2339 Newly built binaries from netbsd-1-4 sources, including fix for
PR#10940.
2001-05-06 20:38:52 +00:00
wiz 7351fa07a1 Rename rtld.1 to ld.aout_so.1, since it only describes ld.so for a.out. 2001-05-06 13:54:04 +00:00
wiz 404935d15a This man page only documents behaviour on a.out. ld.aout_so uses
a colon separated LD_PRELOAD (in contrast to ld.elf_so), so undo last
commit.
2001-05-06 13:49:03 +00:00
wiz aca9dfff7c LD_PRELOAD wants a space (not colon) separated list of libraries.
misc/11961 by Masao Uebayashi.
2001-05-06 12:41:19 +00:00
wiz 77937768d5 Fix date, and drop a space. 2001-04-26 23:31:48 +00:00
kleink 63ccd3db5b Sync with <sys/exec_elf.h> rev. 1.45: ElfNN_RelA -> ElfNN_Rela. 2001-04-25 12:24:50 +00:00
lukem 7e903ba2b0 crank copyrights of files changed this year
remove superfluous byte_count update in send_file_list
crank version
2001-04-25 01:46:25 +00:00
tsutsui 0f85b9ab99 Add a uuencoded binary of a.out m68k ld.so.
Created using following revisions in 1.5.1_BETA source tree:
 ld.h,v 1.2 1998/12/17 23:36:38 pk
 malloc.c,v 1.6.8.1 2001/04/06 09:39:23 he
 rtld.c,v 1.76.4.2 2001/04/06 09:39:43 he
 shlib.c,v 1.18 2000/05/27 06:53:30 matt
 shlib.h,v 1.1 1998/12/15 23:16:14 pk
m68k specific files:
 md-static-funcs.c,v 1.4 1998/01/05 22:00:38 cgd
 md.c,v 1.16 1999/04/12 00:52:44 gwr
 md.h,v 1.9 2000/05/28 01:53:09 matt
 mdprologue.S,v 1.8 1998/01/05 22:00:40 cgd
2001-04-18 11:48:21 +00:00
lukem 7ee956fdcc use own code instead of bother with glob() to do ~ expansion in pathname;
there's no need to support glob wildcards in this case when it's not expanded
here in the non-~ case
2001-04-17 01:37:04 +00:00
lukem 6443de4b8e limit the number of matches in a ~ pathname glob, and complain if more
than one path is matched.
2001-04-17 00:59:58 +00:00
lukem 748a2d7987 minor knf post aidan's oob rototill 2001-04-12 02:28:59 +00:00
tron 37dcd07159 Strip overstrike characters from input lines while searching for a "NAME"
section in a formatted manual page. "makewhatis" now recognizes and indexes
the OpenSSL manual pages properly. Fixes PR bin/12390 by Hubert Feyrer.
2001-04-10 21:00:00 +00:00
itojun 52326c8961 bump version for IPv4 PASV fix. PR 12558 2001-04-10 01:44:56 +00:00
itojun 11b51ed9c6 make checkportcmd address family independent, and correct IPv4 case. PR 12558. 2001-04-10 01:41:18 +00:00
tron 3849906202 Abort parsing and invoke "nroff" if an unsupported macro is found in the
description section of an unformatted manual page. While this makes the
"makewhatis" two times slower in avoids creation of several incorrect
entries in the "whatis.db" database. This fixes PR bin/12535 by
Thomas Klausner.
2001-04-08 14:49:32 +00:00
tron fd7e4484fc - Use ".TH" lines in unformatted manual pages to find correct section
number.
- Always invoke "nroff" if builtin parser for unformatted manual pages
  fails and try to parse formatted manual page.
2001-04-08 14:27:50 +00:00
wiz 14dbdf5518 Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
2001-04-06 11:13:45 +00:00
wiz 89a9190994 syslogd(8), not syslog(8). 2001-04-04 09:56:56 +00:00
wiz 399d20a2af Actually, it's ttyaction, note the silent 't' ;) 2001-04-04 09:56:31 +00:00
wiz e44fde802b Lowercase getty in xref. Whitespace fixes. 2001-04-04 09:55:48 +00:00
wiz 90871ac18e ftpd.conf(8) -> (5), and a whitespace nit. 2001-04-04 09:55:26 +00:00
onoe 740970e20e ignore trailing newline which is included in the message from mail.local. 2001-04-02 14:57:37 +00:00
aidan 979f8b880b add 'noreturn' attribute to ftp_loop, to fix a cc warning. 2001-04-01 23:11:55 +00:00
aidan 7f74ad2bfd As threatened, handle OOB commands from within ftpcmd.y.
This involved changing the yacc syntax to be line-oriented, rather than
having it run against the entire input at once, and adding a flag to
struct tab, to indicate if or not it's acceptable for a command to occur
OOB.
2001-04-01 23:04:30 +00:00
lukem d5de074946 crank for GLOB_LIMIT fix 2001-03-29 13:15:07 +00:00
itohy 71a78d90a9 Common symbol is not a member of particular shlib have particular shlib,
so avoid adding the base address of a shlib to the common symbol.
Fix PR #10940, hopefully.
2001-03-19 03:54:22 +00:00
christos 55dd4165ca don't leak globbed memory. 2001-03-18 22:42:22 +00:00
atatat 4c4a0e2830 Use strtol() instead of atoi() for reading the number out of the
datagram that we received, which leads to easier support for
(ignoring) the procmail messages that specify the folder to which
the message was delivered.

When reading the mailbox, if we encounter a "From " line, we should
exit().  This can occur if there are a lot of rapidly arriving, yet
short messages.
2001-03-16 21:39:08 +00:00
christos 62f543d92e Use GLOB_LIMIT. Also fix a bug where gl_offs was not initialized and could
contain trash.
2001-03-16 20:42:12 +00:00
lukem b687712e95 don't support t(erabyte) as a suffix in strsuftoll() #ifdef NO_LONG_LONG 2001-03-16 20:35:35 +00:00
atatat 32af82236c Fix output to a tty that is missing ONLCR (eg emacs, vi, mutt,
etc.).  This became broken when strvis(3) started being used instead
of simply scanning for "bad" characters.
2001-03-14 04:39:42 +00:00
cgd 65a1026492 convert to use getprogname() 2001-02-19 22:43:42 +00:00
assar 59e8a7a9a3 add -lutil (for pidfile) 2001-02-11 18:30:08 +00:00
assar 03d6b1489a update make infrastructure and shlib versions numbers for heimdal 0.3e 2001-02-11 18:02:04 +00:00
christos 5dea9a59e1 fix redundant declarations. 2001-02-04 22:32:15 +00:00
christos 20d53d3990 fix nested extern 2001-02-04 22:14:13 +00:00
christos 75ac9bb540 remove redundant declarations. 2001-02-04 22:12:47 +00:00
christos fc18ea2931 avoid nested extern 2001-02-04 22:11:12 +00:00
christos bad4697a91 remove redundant decls 2001-02-04 22:10:11 +00:00
christos c6a0145e30 remove redundant decls
fix nested extern
2001-02-04 22:09:01 +00:00
christos f580002996 fix nested extern 2001-02-04 22:05:13 +00:00
christos 4056c9f72d fix redundant declarations. 2001-02-04 22:04:11 +00:00
christos b42a153d41 fix nested extern 2001-02-04 21:59:52 +00:00
pk 38fd9b8f99 Avoid the use of a `switch(){}' statement before _rtld_init() is called.
`switch()' code may be translated using a jump table approach which causes
it to reference the equivalent of a global variable, something that must
be avoided before _rtld_init() has run.
2001-02-03 13:25:00 +00:00
cgd d594ce939b comment or delete text after CPP directives. 2001-01-16 02:50:27 +00:00
cgd bcc8ec9959 include stdlib.h for prototypes (typically for exit()). 2001-01-16 02:44:43 +00:00
cgd 9cfe468c74 avoid C sequence point issues warned about by development version of gcc. 2001-01-16 02:41:17 +00:00
cgd 49376c23c2 use libc version of err rather than a local one. 2001-01-16 02:38:05 +00:00
christos 5d6793c06c back out previous commit; I found a better way of handling the missing
dependencies.
2001-01-14 09:39:26 +00:00
christos 61944ce838 Don't use ${OBJS} in the dependency line, cause it is not defined yet.
Also add a .NOTMAIN for good measure.
2001-01-14 09:16:47 +00:00
lukem d59d820e4b - use SHUT_RDWR instead of 1+1 for the 2nd arg to shutdown()
- use LOG_ERR for fatal errors
- don't use LOG_ODELAY, it's the default
2001-01-11 01:32:34 +00:00
lukem 412ee5c5f1 use LOG_ERR for fatal errors, LOG_WARNING for other errors
minor knf
deprecate LOG_ODELAY; it's the default
2001-01-10 02:51:37 +00:00
lukem 105b038025 consistently use exit instead of return in main()
use LOG_WARNING instead of LOG_ERR for non critical errors
2001-01-10 01:57:51 +00:00
lukem 1ad851cb0f use LOG_WARNING instead of LOG_ERR for non critical errors 2001-01-10 01:50:05 +00:00
lukem 40dcfe23f1 consistently use LOG_NOTICE instead of LOG_INFO for hostname lookup probs 2001-01-10 01:41:38 +00:00
lukem 3f963260b9 be more consistent about syslog usage. now it's more like:
err		fatal errors
	warning		warnings
	info		status messages (-d), stats on SIGxxx
	debug		debug messages (-d), debug stats
2001-01-10 01:13:54 +00:00
lukem 23e3351629 - don't use LOG_ODELAY; it's the default
- use LOG_WARNING (instead of LOG_ERR) for non-fatal errors
2001-01-10 00:36:44 +00:00
lukem cbddac44d6 consistently use syslog priorities 2001-01-10 00:20:49 +00:00
lukem edc4b40801 convert to ansi knf
replace (sole use of) sprintf() with snprintf()
only syslog debug messages if logging
2001-01-09 23:29:22 +00:00
itojun 6e46d0e389 ensure replydirname() do not truncate the names.
From: Paul Janzen <pjanzen@foatdi.harvard.edu>
2001-01-09 06:07:01 +00:00
itojun b32589e180 make sure we do not return stray " at the end of stirng, like bla"\0.
From: "William C. Allen" <allenwc@home.com>
2001-01-09 05:06:14 +00:00
joff d68ab23851 Don't qsort() by the segcreate field. Prevents potentially serious filesystem
corruption if the clock jumps backwards.
2001-01-09 04:31:18 +00:00
lukem de3e6adaf6 use more standard %ll_ in favour of %q_ 2001-01-04 17:24:35 +00:00
sommerfeld 1d442ae998 ${MAKE} print-objdir -> ${PRINTOBJDIR} 2000-12-30 17:29:24 +00:00
sommerfeld ac8e2453b8 Add new :cs: modifier to gettytab which clears the screen using the
appropriate control sequence from termcap (based on the terminal type
listed in /etc/ttys for the line).
2000-12-28 22:18:27 +00:00
scw b37a02f8c1 Define VARPSZ so dynamic binaries work on both 4K and 8K page size machines. 2000-12-21 09:12:54 +00:00
lukem 5015048190 Features:
* Add ftpd.conf(5) directive `advertise'; change the address that is
  advertised to the client for PASV transfers. this may be useful in
  certain firewall/NAT environments.

  Feature requested in [bin/9606] by Scott Presnell.

* Add -X option; syslog wu-ftpd style xferlog messages, prefixed with
  `xferlog: '.  An example line from syslog (wrapped):
	Dec 16 18:50:24 odysseus ftpd[571]: xferlog: Sat Dec 16 18:50:24 2000
	2 localhost 3747328 /pub/WLW2K601.EXE b _ o a lukem@ FTP 0 * c

  These messages can be converted to a wu-ftpd style xferlog file
  suitable for parsing with third-party tools with something like:
	grep 'xferlog: ' /var/log/xferlog | \
	    sed -e 's/^.*xferlog: //' >wuxferlog

  The format is the same as the wu-ftpd xferlog entries (with the leading
  syslog stuff), but different from the wu-ftpd syslogged xferlog entries
  because the latter is not as easy to convert into the standard xferlog
  file format.

  The choice to only syslog the xferlog messages rather than append to
  a /var/log/xferlog file was made because the latter doesn't work to
  well in the situation where the logfile is rotated and compressed and
  a long-running ftpd still has a file-descriptor to the now nonexistant
  xferlog file, and the log message will then get lost.

  Feature requested in [bin/11651] by Hubert Feyrer.


Fixes:

* In ftpd(8), clarify the -a and -c options.

* More clarifications in ftpd.conf(5).

* Ensure that all ftpd.conf commands set a parameter back to sane defaults
  if an argument of `none' or bad settings are given.

* Support the `chroot' directive for `REAL' users too (for consistency).

* For `GUEST' users, store the supplied password in pw->pw_passwd for use
  later in the xferlog.

* If show_chdir_messages() is given a code of -1, flush the cache of
  visited directories.  Invoke show_chdir_messages(-1) in end_login().

* Only syslog session stats if logging is requested.

* Rename logcmd() -> logxfer(), and dolog() -> logremotehost().

* Use cprintf() instead of fprintf() where appropriate.

* Minor KNF, and make a couple of functions static that were declared static.
2000-12-18 02:32:50 +00:00
pk 872b464997 Deal with an empty hints file. 2000-12-17 21:41:15 +00:00
wiz 7cc2f76925 Remove unnecessary header includes; remove 'register'; conform better to KNF. 2000-12-17 20:53:03 +00:00
mycroft 48b362e14c More cruft. 2000-12-15 06:49:19 +00:00
mycroft a19119777a Clean up cruft in here. 2000-12-15 06:46:22 +00:00
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