Commit Graph

2392 Commits

Author SHA1 Message Date
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos ffeec10260 warns=4 2008-04-25 17:34:38 +00:00
dholland 6fc636d882 '_' is functionally alphanumeric in many contexts, including login names.
Since it doesn't have case, treat it like a digit. While here, avoid
setting the associated flag variable by incrementing it.
Fixes PR bin/33521; patch based on one from Dieter Roelants.
2008-04-13 02:38:01 +00:00
tsutsui 5e574c5a4a Add more required libraries by libkrb5 and libroken in NOPIC case. 2008-04-10 14:26:33 +00:00
christos 8a487dca06 Fix build from dieter roelants 2008-04-05 20:17:37 +00:00
lukem 4f3847e772 Reorganize USE_PAM support so that the reply(331,) from USER is
performed by the pam_conv (PAM conversation) callback, which then
getline()s the PASS reply internally.  This involves calling
auth_pam() from user() and caching the result to use later in pass().
This allows the PAM modules to present a different password prompt
dialog if necesary.  For example:
  Name (localhost:lukem):
  331 User lukem accepted, provide password [ otp-md4 89 xxxx12345 ].
versus
  Name (localhost:lukem): root
  331 User root accepted, provide password.

This is independent of (and effectively exclusive to) USE_SKEY support.

Previously ftpd with USE_SKEY=yes would provide the skey prompt
if the user had an skey configured, even if /etc/pam.d/ftpd didn't
have pam_skey in use.
I.e., ftpd shouldn't need special support for custom password prompts
(such as skey) if PAM is in use.
2008-03-27 08:12:09 +00:00
mlelstv 2370a334ab Import Heimdal-1.1
more missing files
2008-03-22 09:29:55 +00:00
mlelstv b0f88a0388 Import Heimdal-1.1 2008-03-22 08:36:48 +00:00
lukem e9810351a7 Switch from lockf() to (more portable) fcntl() locking 2008-03-09 20:11:43 +00:00
mrg 37b5177b06 fix a problem in %xy decoding. 2008-03-07 18:20:20 +00:00
dholland 6e8d2b936b y2038 fixes: time_t != long. 2008-03-04 03:05:00 +00:00
dholland c6b9477692 'struct timezone' belongs in the dustbin of history. 2008-03-04 02:57:33 +00:00
dholland 769bcbf94c fix typo in comment 2008-03-04 02:45:01 +00:00
dholland 6c41aa55b8 Sort includes, removing duplicate <time.h>. 2008-03-04 02:34:27 +00:00
mrg 2e2c24f48c merge bozohttpd 20080303 2008-03-03 22:30:34 +00:00
mrg 707281a285 merge bozohttpd 20080303 2008-03-03 22:15:08 +00:00
mrg e1e74f372d import latest bozohttpd. changes include:
o  fix some cgi header processing, from <thelsdj@gmail.com>
	o  add simple Range: header processing, from <bad@bsd.de>
	o  man page fixes, from NetBSD
	o  clean up various parts, from NetBSD
	o  prefix some function names with "bozo"
	o  align directory indexing <hr> markers
	o  clean up some code GCC4 grumbled about
2008-03-03 22:03:08 +00:00
mrg 9240578f89 use BUILDSYMLINKS to not have to rename bozohttpd.8 while still
having this manual installed as httpd.8.  now updates from my
repo to bozohttpd.8 will appear in this file.
2008-03-03 03:10:53 +00:00
jmmv d8ef502768 Add the atf-exec and atf-killpg tools that come with atf 0.4. 2008-02-04 20:31:32 +00:00
christos b11674e1a4 move gettytab to paths.h 2008-02-04 15:27:20 +00:00
mrg e972654d70 support MKCRYPTO=no:
- don't link -lssl -lcrypto
- -DNO_SSL_SUPPORT
2008-02-03 23:48:09 +00:00
lukem d9ce2acdd5 Explicitly note the unsupported requests from RFC 2228.
Improvements from FreeBSD:
* Document `ftp-chroot' from login.conf(5).
* Document that SIZE is prevented for files > 10240 bytes via ASCII transfers.
2008-01-30 02:16:35 +00:00
yamt 8c93baa802 constify 2008-01-14 08:53:42 +00:00
yamt 8a58f724e1 tabify 2008-01-14 08:52:16 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
christos 8fb14189dc make this compile again. 2007-12-29 01:44:03 +00:00
ad 2b5d04688e Make it build with src/sys from the vmlocking2 branch. 2007-12-28 21:44:32 +00:00
christos 716fde8fa0 simplify; mapbase == vaddrbase from the PaX author. 2007-12-28 19:36:21 +00:00
christos 8636ab52f6 Deal with ASLR PIE executables, by recognizing that phdr != phdr->v_addr
for PT_PHDR headers when the program has been loader to a vaddr other than
then one specified (a randomized one), and modifying the relocation base
address appropriately (idea from elad)
2007-12-26 21:14:41 +00:00
christos 8b0637156f No need for stack_protector.o if USE_FORT is no.
XXX: compiling a binary with -Wl,--dynamic-linker,${NETBSDSRCDIR}/libexec/...
results in stack overflow. Investigate!
2007-12-26 21:11:52 +00:00
christos 5ad1b72097 print the symbol we are seaching for [when debugging] 2007-12-26 21:10:03 +00:00
perry 9dfe283011 remove cdefs.h at mrg's request 2007-12-16 02:38:24 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
perry 36c7456d7c include sys/cdefs.h so that __attribute__ can be fixed later 2007-12-15 16:32:05 +00:00
ad 558a5ffd0f rtld changes for PR bin/37347:
- Apply patch from J.T. Conklin to execute .init/.fini functions in order.
- Support DF_1_INITFIRST and mark libc with DF_1_INITFIRST. Shared libs
  should be recording a dependency on libc, but it's too late to do that.

Ok christos@.
2007-12-07 20:34:04 +00:00
isaki 5b22b72692 white space fix. 2007-12-03 09:54:24 +00:00
wiz 04cd5014b6 filetypes -> file types. 2007-12-02 19:15:07 +00:00
christos 496f9be3e8 support %z 2007-11-24 18:32:26 +00:00
ad 71ac015ebf stack_protector.c has moved. 2007-11-13 15:34:51 +00:00
jmmv 9d5a9c0d86 Add the atf tools
This adds reachover Makefiles to build and install the atf tools.
Some are public, thus installed in /usr/bin, and others are internal
and therefore installed in /usr/libexec.
2007-11-12 15:00:00 +00:00
rtr 3aa5278c3a - remove const from h_header, this pointer is occasionally free'd
- remove unused write_str var
+ move header parsing to new function separation of parsing vs processing
+ alter some variable names to avoid confusion between header value and
  header name (caused breakage with previous rev)
2007-11-04 15:20:11 +00:00
rtr 6dc1829962 + don't free strdup()'d ptr that was manipulated.
(i.e. free(): warning: modified (chunk-) pointer))
+ don't leak memory for ptr actually returned from strdup()
+ don't strdup() if we don't have to
+ don't break without free() if we did strdup()
+ as well as freeing h_value also free the header.
2007-11-04 06:07:52 +00:00
skrll 29353f93e2 Build a local copy of exit that doesn't call __cxa_finalize. It's not
needed and drags in a lot of libc via free.
2007-10-30 17:19:59 +00:00
christos ed1a8fea8d build stack protector locally so that we don't call syslog_ss that results
in 1/2 of libc dragged in.
2007-10-29 20:36:31 +00:00
ad bc89ba23ac Make the dir indexes less ugly (horizontal rules were out of place). 2007-10-18 18:53:59 +00:00
he a9cf29f812 A build for sun2 reveals that we also need -lcrypt, as auth-bozo.c
otherwise gets an unsatisfied reference to crypt().
2007-10-18 17:43:02 +00:00
tls 18c80b6525 RCS IDs 2007-10-17 18:47:59 +00:00
tls 13d3c473b0 Fix two memory leaks noted by Coverity (CID-4694, CIT-4695) and use
SIMPLEQ_FOREACH where possible.  Patch from Arnaud Lacombe.
2007-10-17 18:43:46 +00:00
reed 15823ba9ad Document .htpasswd / HTTP "Basic" authentication support.
Update date of man page too.
2007-10-17 13:55:46 +00:00
reed 7c5821fbe4 Fix typo in EXAMPLES (unknown service).
While there mention inetd.conf(5) again (since in a new section of man page).
2007-10-17 13:33:18 +00:00
reed dbfaed2362 Fix typo on Makefile which causes HTTP Authentication support
to not be used.

Now fix auth-bozo.c to not have warnings "may be used uninitialized"
and pointer targets "differ in signedness".
2007-10-17 13:27:19 +00:00
reed ca8ed3ab02 Remove extra period. 2007-10-16 22:50:01 +00:00
tls 215e50961e Add httpd to the build. Add _httpd to passwd and groups and postinstall.
Add /var/www to mtree, add example line to inetd.conf.
2007-10-16 02:47:12 +00:00
tls 1d63366b2d Get httpd ready for inclusion in build. 2007-10-16 01:31:03 +00:00
tls ba6eac50dd Move bozohttpd.8 to httpd.8 2007-10-16 01:29:44 +00:00
tls 60dbe74596 Import of bozohttpd for its originally intended purpose: a small (~30k)
simple run-from-inetd httpd suitable for small systems (and some large
ones).
2007-10-16 01:14:01 +00:00
ad 9c5739f1c6 brelse() now takes two arguments. 2007-10-08 21:41:12 +00:00
ad bf4b000d16 - Don't use the names malloc/free/etc, since we can end up pulling in libc's
malloc which is not what we want.
- Remove ancient memory compaction hack. Realloc on free memory is now an
  error again (from joerg@).

Ok christos@.
2007-10-05 22:21:07 +00:00
christos 596c6ec5db provide xrealloc, and don't cast and use malloc and realloc directly. 2007-09-27 17:52:16 +00:00
christos 2cce1500a2 If we are using SSP, compile in a separate copy of the stack protector
functions so that we don't end up calling syslog_ss() which drags in
a large portion of libc. Found by skrll...
2007-09-27 17:51:40 +00:00
christos 6f875d32e2 Don't trust AT_SUN_EXECNAME, if we are set{u,g}id. 2007-09-21 13:57:09 +00:00
christos 6eac115581 delete debug printf
make regress compile again.
2007-09-20 19:42:53 +00:00
christos 40cfdb5e3a Use AT_SUN_EXECPATH instead of argv[0] for the executable name. This needs
kernel support, which is not there yet, thus $ORIGIN is broken at this time.
This is ok, nothing uses it yet.
2007-09-20 14:14:25 +00:00
cube f7779133cd Don't remove the last component of filename before calling
_rtld_digest_dynamic:  it is done in expand(), and doing it twice is once
too much.  This fixes $ORIGIN expansion for dependencies.
2007-09-20 07:50:32 +00:00
tnn ea0fc2f827 5 is not a valid version for .Nx, so change it to 5.0. 2007-09-13 21:32:14 +00:00
joerg ad61ac15d2 Don't define bool, false and true. Use stdbool.h. 2007-09-02 09:57:16 +00:00
tls b8360b28b0 Oops. USE_FORT needs to be in Makefile.inc, not Makefile, to cause the
programs in subdirectories here to get -D_FORTIFY_SOURCE.
2007-08-16 18:36:46 +00:00
lukem f21ab048da Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris. 2007-07-23 10:41:05 +00:00
lukem 0def0e3a66 Rename HAVE_SOCKADDR_SA_LEN to HAVE_STRUCT_SOCKADDR_SA_LEN.
Use defined(HAVE_foo) instead of just testing HAVE_foo.
2007-07-22 05:06:45 +00:00
christos 2ffe4b875f Use an elf note to handle pax arguments. This is a temporary solution to
avoid wasting OS flag bits. In the future we'll probably use fileassoc to
achieve this (once there is a way to make fileassoc persistent) or in the
shorter term libelf, so that we can add and remove the note on demand instead
of burning bits on each binary. Of course since this is a tool, this means
that we'll need to think about how to handle libelf...
2007-06-24 20:35:36 +00:00
christos b7c1cbea43 PR/36468: Andreas Wrede: ftpd(8) always logs hostnames. Add -n option to display
addresses.
2007-06-10 20:24:31 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos 3b320420fe fix a comment. 2007-05-18 21:46:39 +00:00
christos 04ee85ad50 Support Solaris-like $ORIGIN etc. expansions in paths. 2007-05-18 21:44:08 +00:00
lukem aeb5730de8 Replace references from draft-ietf-ftpext-mlst-NN to RFC 3659. 2007-05-10 05:59:30 +00:00
christos 8cb0a31f67 PR/36266: David A. Holland: Don't read and write sig_atomic_t variables in
signal handlers; only write them.
2007-05-03 15:09:41 +00:00
lukem 0f13d99318 Expand documentation on numeric argument suffix parsing, and convert
to IEC 60027-2 prefixes for 2^n multiples ("KiB" instead of "KB", etc.)
2007-04-13 01:36:10 +00:00
scw 596a371d09 Remove a test for defined(__SH5__). 2007-04-08 10:02:35 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
matt 549524f84f Deal with MKPICLIB != no. 2007-03-15 17:27:15 +00:00
matt ee98d74a6b Remove MD COMBRELOC support since it's now MI.
Enable COMBRELOC for all arches
2007-02-23 01:17:11 +00:00
matt 364993dede Don't use cached results for plt lookups (nor save them). 2007-02-23 01:16:32 +00:00
matt 4d10e5e667 Make the COMBRELOC support generic. 2007-02-22 18:57:48 +00:00
hubertf 9c23f96c50 Move ctype.h from headers to files which really need it
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:14:07 +00:00
hubertf ee68ca46c0 Remove unnecessary ctype.h from libexec/comsat/comsat.c file
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:06:26 +00:00
martin 3cc1de3d7b Add COMBRELOC support 2007-02-15 19:42:13 +00:00
skrll 1fddd99f52 Provide COMBRELOC support for amd64 in answer to PR/35589.
Some statistics:

base + COMBRELOC
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  148.64s
user 4.82s system 99% cpu 2:33.93 total

base + DF caching:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  151.15s
user 5.53s system 99% cpu 2:37.23 total

base:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; )  492.36s user
5.34s system 99% cpu 8:19.17 total
2007-02-15 15:44:28 +00:00
christos 8fdab46bcc PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX 2007-01-20 17:26:32 +00:00
hubertf d405d8ca2b Remove duplicated #includes and some trailing whitespace while here.
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 21:44:50 +00:00
christos 129c516e3b - use getnameinfo instead of gethostbyaddr
- add tsa2sa and use it
2007-01-08 17:51:34 +00:00
wiz fc86b06120 Bump date for previous. 2006-12-23 07:21:34 +00:00
christos aca8873558 fix volatile and initialization issues, from Anon Ymous 2006-12-17 20:04:09 +00:00
he 0a97c3f688 Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result
2006-12-14 20:09:35 +00:00
jdolecek 20480d6fc5 allow compilation without SUPPORT_UTMP 2006-12-04 21:13:22 +00:00
wiz 09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
christos aac134252a From defend dot the dot world at gmail dot com: Sanitize environment variables
for set{u,g}id binaries, so that in case they are playing with set{u,g}id
and exec'ing other binaries they don't get affected by the
LD_{PRELOAD,DEBUG,LIBRARY_PATH} environment setup. We leave LD_BIND_NOW alone.
There are no binaries affected in the base system.
2006-11-22 21:46:36 +00:00
tls 86c7b9ff84 Temporarily disable -c (file coalescing) until data corruption issues can
be resolved.
2006-11-18 18:43:25 +00:00
atatat bade8c3805 remove stray links 2006-11-16 04:43:32 +00:00