Commit Graph

3078 Commits

Author SHA1 Message Date
alnsn 9a921db489 Cosmetic changes to Lua binding in bozohttpd.
- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.
2017-05-28 22:37:36 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
uwe 672fc2f785 PR port-macppc/47464 - Old binutils generated bogus zero-sized COPY
relocations for _SDA_BASE_ and _SDA2_BASE_ that happened to work by
accident.  They no longer happen to work when old binaries are run on
newer systems.  Explicitly ignore these bogus relocations.
2017-04-27 08:37:15 +00:00
maya cfef4500d4 Revert to version 1.55 of map_object.c. This reverts:
"really unmap the gap between the text and data rather than just removing
all access with mprotect().  the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero."

As per toolchain/52054: src/libexec/ld.elf_so update breaks everything,
this commit is very broken for some people (but not others). chs mentioned
he has a fix, but best not to leave -current broken in the meantime.
2017-03-10 09:13:49 +00:00
chs cf66c8999a really unmap the gap between the text and data rather than just removing
all access with mprotect().  the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero.
2017-03-09 00:43:50 +00:00
chs 1c75bf6f84 tag the powerpc hackish_return_address() as __noinline. 2017-02-27 20:25:26 +00:00
mrg 002f468d50 uh, this is actually called 20170201 :-) 2017-02-05 01:55:03 +00:00
mrg 7dd016e517 fix the prototype for bozo_set_pref(). from cfkoch 2017-02-04 01:32:54 +00:00
mrg 630f2c0b49 call this bozohttpd 20170201. 2017-01-31 14:36:09 +00:00
mrg 2c19cec69e - fix a bug in cgi processing. from Dennis Lindroos.
- add a testcase for this, and expand test-simple to handle additional
  args to bozohttpd for eg, cgi-bin setting.
- fix objdir bugs in the testsuite.
2017-01-31 14:33:54 +00:00
christos 92838f1e37 kerberos needs sqlite3 2017-01-28 23:40:51 +00:00
abhinav b461520850 Fix typo: s/suport/support 2017-01-20 16:14:44 +00:00
christos a80110f6b6 need <sys/stat.h> 2017-01-10 21:08:48 +00:00
christos 7d85ef5c1f need <sys/stat.h> for chmod 2017-01-10 21:08:15 +00:00
christos 2c1d98b710 missing <sys/stat.h> include. 2017-01-10 20:29:48 +00:00
schmonz 10c3be53a3 When testing non-verbosely, show diff on failure. ok mrg@ 2016-12-27 12:09:19 +00:00
abhinav 96415509bf Fix a sentence. 2016-12-24 05:40:49 +00:00
abhinav c665c84ea5 We don't have any ``name'' program, so remove its reference
and use markup to refer finger(1).

ok wiz@
2016-12-22 12:42:24 +00:00
abhinav cad7fa138e Fix sentences at a couple of places. 2016-12-21 09:33:08 +00:00
abhinav ca3357623e s/users/user's
Also, add an xref to services(5)
2016-12-20 09:22:18 +00:00
maya 21cc7f1b6b acknowleg -> acknowledg, proceedure -> procedure.
only comments were changed.

from miod
2016-12-12 15:58:44 +00:00
wiz d8a6eb3c16 Whitespace. 2016-12-12 10:07:48 +00:00
mrg 48524f008b there was a bug fix in july. call this 20160720. 2016-12-11 20:40:41 +00:00
christos a106fb55e5 Add libprop for static linking 2016-12-11 15:43:48 +00:00
christos a363700a4c Fix the direction; ipf/pf seem to be wrong... 2016-12-10 22:09:18 +00:00
christos 4ce8846de5 Fix varargs. 2016-12-10 22:08:13 +00:00
christos b525cd90e0 add npf support. 2016-12-10 05:43:11 +00:00
christos c8c18415f0 n dl_iterate_phdr return the path not the name. 2016-12-01 18:21:39 +00:00
christos f9f702d000 Instead of using a function to resolve symbols that should be supplied by
the dynamic linker itself, use a version script that exposes them. From joerg@
2016-12-01 14:29:15 +00:00
christos 1abd6678f6 add missing newline in comment 2016-11-30 20:25:23 +00:00
christos d32757ced4 Emulate the standard symbol search order in dlsym() i.e. resolve weak or
not found symbols that are in the dynamic linker list of exported symbols
from the dynamic linker itself.
2016-11-30 19:43:32 +00:00
christos 07303da5f3 revert, I'll fix libc instead. 2016-10-07 19:10:03 +00:00
christos 94e616077b Mips o32 needs -lgcc for __udivdi3 in headers.c for fast_divide32_prepare(). 2016-10-07 17:12:59 +00:00
mrg da548da125 update the -V documentation to be more clear about what it does.
inspired by Swift Griggs on netbsd-users.
2016-10-04 18:33:00 +00:00
mrg 5261f4fbc4 add -V to the usage() list. noted by Swift Griggs on netbsd-users. 2016-10-04 18:26:47 +00:00
schmonz 7ec9a291e1 Missed in previous: exit 1 if html_cmp says no match. 2016-09-26 00:21:22 +00:00
schmonz 268438cada Add a VERBOSE knob to the testsuite ("yes" by default, producing
basically the same output as before). When turned off, tests run
silently except when there's a failure.

Reviewed by mrg@.
2016-09-23 16:55:56 +00:00
martin fee8b601f9 Despite the 10 in the name, the OLO10 relocation targets a 13 bit field,
the offset (O) providing the additional data.
2016-08-29 16:00:10 +00:00
mrg bfef5cee0b use netbsd rcsid 2016-08-20 00:36:41 +00:00
shm febbddea26 Fix error checks in open(2) calls. 2016-07-21 12:29:37 +00:00
shm ef0b7ea3b6 CID 976523: add FALLTHROUGH 2016-07-20 20:18:21 +00:00
shm 31d615acc3 CID 603440: ensure that closing socket exists 2016-07-19 21:25:38 +00:00
shm d3c94bcc3a Fix race condition in deliver(), fix resource leak. 2016-07-19 13:11:38 +00:00
shm 1202090c01 Do not send encoding header for compressed formats. 2016-07-19 09:27:40 +00:00
mrg 9d18868a64 avoid an impossible case the compiler can't quite tell. 2016-06-30 13:17:48 +00:00
martin 115160e654 Fix a few bounds and instruction sequences generated in the PLT; exercised
by ASLR and verified to work with the aslr fixed random debug sysctls.
2016-06-20 08:12:25 +00:00
christos 4910b5ce72 Move relro after we've computed out relocbase and re-enable it.
(Matthias Weckbecker)
2016-06-16 11:34:13 +00:00
christos 3ee1ef9906 Turn off GNU_RELRO for now. 2016-06-15 12:08:47 +00:00
christos 0e6265fc35 Add support for GNU RELRO headers from Matthias Weckbecker. 2016-06-14 13:06:41 +00:00
agc 205633288c As proposed in:
http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

	https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

	% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
	bozohttpd version bozohttpd/20160415
	%
2016-05-24 21:18:29 +00:00