Commit Graph

3250 Commits

Author SHA1 Message Date
joerg
336e4f812b Use alignof and not size_t for platforms with non-natural base
alignments.
2019-11-05 22:22:42 +00:00
joerg
a0e0f8b685 PR 54093: Align static TLS area to max_align_t. 2019-11-04 12:45:10 +00:00
christos
ba0758a3b7 simplify pointer gymnastics that sprained gcc-8 2019-11-03 03:15:59 +00:00
mrg
50851f2ac3 set -D_GNU_SOURCE, needed for linux systems and should be
harmless or ignored elsewhere.

from perry.
2019-10-30 07:28:13 +00:00
christos
3a70c5972e bump sizes 2019-10-15 18:29:32 +00:00
christos
384c9fdd8d use strncpy... 2019-10-15 18:29:21 +00:00
mrg
9d7a8fa9a3 use strlcpy to ensure termination.
the buffer is statically sized so that it works without an
allocator, so truncation is the desired effect here.
2019-10-13 20:18:42 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos
7519806b07 use __func__ (c99, c++11) instead of __FUNCTION__ 2019-10-04 01:57:53 +00:00
tnn
e91fbc780d improve error message 2019-10-03 10:34:30 +00:00
kamil
3b610a6e8d Return the ELF loader dl_phdr_info information for dl_iterate_phdr(3)
Sync the behavior of dl_iterate_phdr(3) with Linux/FreeBSD/OpenBSD.
2019-09-15 13:40:46 +00:00
wiz
2ddc414a15 New sentence, new line. Punctuation improvements. 2019-08-31 07:49:48 +00:00
brad
a1475d6d11 Add support for passing the raw device name separate from the
filesystem.  This is useful in the case where the cleaner is compiled
into code, such as rump_lfs and the ATF tests.  This helps to fix
bin/54488
2019-08-30 23:37:23 +00:00
rmind
0dd7abe473 libnpf fix: link the library itself to libnv; libnpf users should not be
expected to assume this dependency.
2019-08-24 13:20:52 +00:00
brad
ca50e52c93 Use getdiskrawname to find the device name
Reviewed by Christos
2019-08-22 20:28:08 +00:00
kamil
d9a1e5d37f telnetd: Stop defining the same variables concurrently in bss and data
auth_level and require_secure_login were defined in two places:

 - global.c that picked it from headers and removed 'extern'
 - telnetd.c that initialized it to 0

line was defined twice: in global.c and sys_term.c with a non-zero value.
Remove the definition and initialization from sys_term.c and initialize
the variable early in main().

Detected during the build of telned with Address Sanitizer (MKSANITIZER).

Reviewed by <mrg>
2019-08-15 01:15:21 +00:00
uwe
8fd03c43d4 Tweak markup some more. 2019-07-15 01:26:15 +00:00
uwe
c42a8ccb39 Improve (hopefully) mark up of the capabilities tables. 2019-07-12 03:32:41 +00:00
uwe
776605b5ed Use proper markup instead of .Em to refer to capabilities, structure
memebers, etc in the text (but not in the tables yet, as those require
more rework).
2019-07-12 01:53:45 +00:00
wiz
25c730350a Merge lines. Fixes display problem noted in PR 54361 by he@ 2019-07-11 09:48:22 +00:00
maya
3bb853ed54 r_symndx is no longer declared, use symnum and initialize it before use.
Completes the changes in the commit:
"Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects."
http://mail-index.netbsd.org/source-changes/2017/06/19/msg085496.html
2019-04-15 19:13:03 +00:00
maya
53dcb847d9 $ORIGIN support is now enabled.
Thanks martin for the heads up.
2019-04-15 10:17:01 +00:00
abhinav
55eec9d71a Typo: s/a indirection/an indirection/ 2019-04-15 06:42:06 +00:00
wiz
a30bc70869 Use more Dv. 2019-04-14 22:09:50 +00:00
maya
9a04775cfa Note that we now search DT_RUNPATH paths as well. 2019-04-14 20:27:02 +00:00
christos
fb007af046 undo previous unlock/relock; it is not needed now that we added the tls model
declaration to all externs in jemalloc (suggested by joerg@)
2019-04-14 19:21:37 +00:00
christos
15018ca013 Fix c++ exceptions on arm; jemalloc calls _rtld_tls_get_addr from inside
dl_iterate_phdr, so we need to unlock and relock.
2019-04-13 03:15:25 +00:00
rin
e66054b66e Do not compile __tls_get_addr() into ldd(1), which fixes ldd(1) crashing
on arm after switching to new jemalloc.

jemalloc invokes __tls_get_addr() under some condition. If anything other
than ld.elf_so nor libc exports it, inconsistency arises as a result.
2019-04-13 00:23:32 +00:00
christos
39fadeea40 Disable optimization for rtld.c on the vax with gcc-7. 2019-04-03 21:37:58 +00:00
martin
9e275c0f36 Account for cgihandler being set when counting the number of CGI environment
headers we are about to set. Avoids an assertion failure (and overruninng
the array) later.
2019-03-29 14:46:44 +00:00
mrg
58a223ca24 add $NetBSD$ 2019-03-27 04:50:30 +00:00
mrg
8b21018e17 on m68010 set BOZO_WRSZ to 16k and BOZO_WRSZ to 64k. 2019-03-08 03:12:28 +00:00
mrg
767fb2605a call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.
2019-02-28 09:16:42 +00:00
mrg
08dbfa234a add ssl specific timeout value (30s). if SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.

mostly different from, but inspired from the patch in PR 50655
2019-02-28 08:28:21 +00:00
mrg
f0885992ce - bump buffer sizes to avoid potential truncation issues 2019-02-04 04:36:41 +00:00
mrg
fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
lukem
fc9234654d clarify the fd used for blacklisting.
Use STDIN_FILENO instead of 0 as the fd to blacklist_r(),
since we use the former in ftpd.c
2019-01-29 23:19:30 +00:00
lukem
086f834b20 NetBSD-ftpd 20180428
Update version to "NetBSD-ftpd 20180428" for changes:
- Fix violations of the sequence point rule.
- Check that stat and fstat succeed.
- Support blacklistd(8) hooks.
- Clear utmpx struct before writing it to wtmpx files.
- Fix directory stream leaks.
- Use explicit_memset(3) instead of memset(3) to clear password.
- Fix scope of variable. PR misc/50665.
- Ensure that closing socket exists. CID 603440.
- Add -f option to ftpd to stay in foreground with -D. PR bin/53221.
2019-01-29 11:51:05 +00:00
dholland
ad8aa774f5 fix duplicated chunk from merge 2019-01-27 04:33:29 +00:00
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
mrg
00e064adab o don't display special files in the directory index. they aren't
served, but links to them are generated.
2019-01-22 05:32:57 +00:00
skrll
69e8dca2e5 Adapt https://svnweb.freebsd.org/base?view=revision&revision=342113 to
NetBSD.

This brings us resolving for dynamically loaded libraries and makes
tests/libexec/ld.elf_so/t_thread_local_dtor pass.

With suggestions from joerg@
2019-01-18 11:59:03 +00:00
mrg
8f49d6e252 rework size_arrays():
- avoid calloc, use bozomalloc
- minor CSE
- fix bozoprefs->size setting when increasing the size (new total was
  being added to the prior total.)  found by clang static analyzer
  from rajeev_v_pillai.

pass httpd to size_arrays() now.
free(NULL) is legal.
2019-01-18 06:04:10 +00:00
mrg
5335936687 fix a few problems pointed out by clang static analyzer, from rajeev_v_pillai:
- bozostrnsep() may return with "in = NULL", so check for it.
- nul terminating in bozo_escape_rfc3986() can be simpler
- don't use uniinit variables in check_remap()
- don't use re-used freed data in check_virtual().  this one is tricky as
  the original code was:
	free(request->hr_file);
	request->hr_file = bozostrdup(httpd, request, s ? s : "/");
  however, bozostrdup() may reference request->hr_file.
2019-01-18 05:48:31 +00:00
mrg
9b91523ebd - call this 20190116
- adjust the directory indexing again:
  - don't include "index.html" in html headers
  - additional escaping of names
  - re-add top/bottom borders
  - adds an aquamarine table header
  - Zebra-stripes table rows using CSS instead of code
  all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>
2019-01-17 07:46:16 +00:00
mrg
d1eeb82409 add 'check' target to toplevel makefile.
fix the t11.out output now that CGI parsing works better.
2019-01-17 07:39:00 +00:00
mrg
9c0805993a - fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>
2019-01-17 07:34:06 +00:00
christos
d17b8a0ea7 print the program name when we don't find a library.
XXX: really most _rtld_error() should do that, and most do.
2019-01-12 18:58:10 +00:00
uwe
62a27ee607 Spell "occurrence" correctly. 2019-01-09 17:19:08 +00:00
mrg
4aff0e8a96 remove reference to deleted -r option. fixes PR#53840 from J. Lewis Muir. 2019-01-08 06:04:29 +00:00