Commit Graph

3108 Commits

Author SHA1 Message Date
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
christos 564475388a Put the name of the dynamic linker in allocated memory, so that it becomes
part of the core file link-map, so that gdb can find it.
2016-05-24 20:32:33 +00:00
joerg 6e49b77769 obj->phdr must be the absolute address, not the virtual offset from the
main binary. Historically, this has been the same. For PIE though,
relocbase can be pretty much anywhere. Fixes PR toolchain/51159.
2016-05-22 19:28:39 +00:00
christos f7945701d6 CID 1358679: Fix memory leak.
XXX: pullup 7
2016-04-24 18:24:47 +00:00
mrg 0a7cdc80ba use %zu instead of %lu for size_t. 2016-04-15 20:00:13 +00:00
mrg 27da98ff14 updates and bozohttpd 20160415:
o  add search-word support for CGI
o  fix a security issue in CGI suffix handler support which would
   allow remote code execution, from shm@netbsd.org
o  -C option supports now CGI scripts only
2016-04-15 17:57:21 +00:00
skrll 42fe483061 Remove duplicated __RCSIDs I added years ago - I blame CVS.
Spotted by Miod Vallat
2016-04-14 20:17:07 +00:00
christos 80c3d4eb2a - Print a warning for text relocations
- Don't remap the text segment executable while relocating
2016-04-12 19:10:48 +00:00
mrg 7bc3291858 move the compiler hack closer to the source of the fail 2016-03-18 10:10:21 +00:00
christos 43c3c3f74a Add volatile for gcc 5 2016-03-17 00:21:04 +00:00
christos f2192299b9 volatile for gcc 5 2016-03-17 00:17:58 +00:00
mrg 2dc66b067e make the GCC 4.8 specific hack for ci.clean being set GCC >= 4.8. 2016-03-16 18:58:34 +00:00
dholland d9047ae69b Use functions instead of preprocessor abuse. 2016-03-13 00:32:09 +00:00
christos 80fa2ce1a5 where is already void * 2016-02-20 15:20:23 +00:00
macallan 3709f36323 make debug code compile again
from christos
2016-02-19 22:09:09 +00:00
riastradh 9628679b27 Need <stdbool.h> for true/false. 2016-02-19 03:53:46 +00:00
skrll 19b4c45621 Actually, descsz should not contain the padding. The note still needs to
be padded out.
2016-02-09 10:20:03 +00:00
skrll a5b645efc7 Fix .note.netbsd.march by ensuring correct padding 2016-02-08 11:59:39 +00:00
christos a21e664447 we don't need <sys/mbuf.h> 2016-01-24 01:56:04 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
christos 8d60259f07 PR/50665: David Binderman: move "dir" to the outer scope so it stays alive
when the pointer is used later.
2016-01-17 14:46:07 +00:00
elric 591b978b80 Fix bug in cleanup of reply headers. 2016-01-02 20:35:59 +00:00
elric afe55bf842 Add the concept of ``reply headers'', that is a SIMPLEQ of headers that
will be included in the HTTP reply.  We define this as we are about to
add an authentication method that may need to have a conversation with
the client.
2016-01-02 18:40:13 +00:00
mrg 0841a79ea3 bump the version; we have real fixes now. 2015-12-31 04:58:43 +00:00
mrg 614a8b6713 redo the fix for rev 1.26 - instead of getting a new string wrong,
just delay the free until the parent has finished using them.
also, free query as well.

fixes PR#50374.
2015-12-31 04:39:16 +00:00
mrg 84411b5891 rewrite the redirection url generation code to use bozoasprintf(). 2015-12-29 04:30:33 +00:00
mrg c2e98309d5 - convert most asprintf() calls to bozoasprintf().
- don't call getpwuid(0) if we don't need to, or fail it it fails,
  and remove the 'username' member of bozohttpd_t since it is not
  used outside of bozo_setup().
2015-12-29 04:21:46 +00:00
mrg 881b8188de rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.
2015-12-28 07:37:59 +00:00
mrg cff2d95613 several clean ups:
- bozostrdup() gains a request parameter, and uses it to determine
  what sort of error handling is required
- bozo_strdup() dies
- size_arrays() reduced slightly, pushing error handling into the caller
- convert to size_t for some array indices
- bozo_set_pref() and bozo_init_prefs() gain httpd parameters
- apply a bunch of manual CSE to vastly reduce the number of times the
  string "request->hr_httpd" appears.
- CGI parse_header() takes a request not httpd now

XXX: lua glue updated to call bozo_init_prefs() with htttpd parameter,
     but i'm only guessing here.
2015-12-27 10:21:35 +00:00
mrg 71e7babf6d fix running the testsuite from the build tree 2015-12-27 07:43:39 +00:00
christos f47ab3a37e Introduce bozo_strdup and bozo_asprintf to add error checking and reduce
code duplication.

Note that bozo_strdup is different that bozostrdup; the _ routines exit
loging error to syslog or stderr, whereas the non _ routines send error
responses to the http client.
2015-12-12 18:06:58 +00:00
christos 14ba256990 - restrict the default list of ciphers to something more secure
- restrict ssl options
From Travis Paul
2015-12-12 16:57:53 +00:00
kamil d3f055bfc7 Improve the httpd(8) printenv.lua Lua example
Stop using Lua builtin print function and replace them with http.* ones.
httpd.print and http.write wraps SSL support when needed.

Print http headers, without them browser may interpret page as raw text.

No need to hardcode prefix path in the form.

Add comments for a user with tips how to use this script.

Patch by Travis Paul

Closes PR misc/50502
2015-12-07 03:11:48 +00:00
kamil a2fa5fef62 Bump date for previous 2015-11-29 15:58:07 +00:00
kamil 1e3b6beb3f Synchronize SYNOPSIS with reality 2015-11-29 15:29:55 +00:00
kamil 55cd314790 Remove nonexistent option z: in the getopt(3) call 2015-11-29 15:26:10 +00:00
christos 59f3853f3e handle asprintf errors consistently. 2015-10-31 00:55:17 +00:00
christos e3e5f7f09b fix wrong variable 2015-10-30 23:45:31 +00:00
christos 1932f6942a simplify 2015-10-30 23:27:47 +00:00
christos b44c2ed92e - don't use alloca and then check if alloca returns null and then try to
free it. Allocating from the stack does not return null, and freeing it
  will have unpredictable results. use malloc instead.
- now we are using malloc remove -Wno-stack-protector kludge
2015-10-30 23:21:05 +00:00
tron 63d7176dc2 Fix build with "USE_SSP" set to "yes". 2015-10-30 18:53:26 +00:00
shm c4fe1fac22 * add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@
2015-10-28 09:20:15 +00:00
mrg ce12165d33 s/USE_NBUTIL/HAVE_NBUTIL_H/, to match the Makefile.
fixes a merge problem in introduced when merging the QNX patches.

from Jan Danielsson.
2015-10-25 19:06:49 +00:00
dholland fbd9d636b3 Enable lfs64 in the cleaner. 2015-10-15 06:25:04 +00:00
christos 029efed26d this is syslog-like 2015-10-14 15:53:50 +00:00
dholland 4f6e0f51f3 Use llabs(), not abs(), on the difference of daddr_t's.
Caught by clang, reported by joerg.

Turn off the clang-specific compiler flags that were making the report
nonfatal.
2015-10-10 22:34:46 +00:00
dholland c4e7149610 Use IINFO in the cleaner. 2015-10-03 08:28:30 +00:00
dholland 89fa7c41df Remove dead assignment; from Henning Petersen in PR 50196. 2015-09-03 08:16:36 +00:00
dholland ec175d5025 Add new accessors for the d_type and d_namlen fields of struct lfs_direct.
Napalm the old byteswap access logic for these.
2015-09-01 06:16:58 +00:00
dholland eb2560adae The ifile's inode number is constant. (it is always 1)
Therefore, storing the value in the superblock and reading it out
again is silly and offers the opportunity for it to become corrupted.
So, don't do that (most of the code already didn't) and use the
existing constant instead. Initialize new 32-bit superblocks with
the value for the sake of old userland programs, but don't keep the
value in the 64-bit superblock at all.

(approved by Margo Seltzer)
2015-09-01 06:12:04 +00:00
dholland 4d398b859d Add byteswapping to the dinode accessors.
This prevents regressions in the ulfs code when switching to the new
accessors. Note that while adding byteswapping to the other accessors
is straightforward, I haven't done it yet; and that also is not enough
to make LFS_EI work, because there are places lying around that bypass
the accessors for one reason and another and all of them need to be
updated. That is going to have to wait for a later day as LFS_EI is
not on the critical path right now.
2015-09-01 06:10:16 +00:00
mrg 4ff1396ff2 s/dirname/dirpath/ to avoid potentially shadowing dirname(3). 2015-08-27 17:12:18 +00:00
wiz 9e1c9adfc5 Remove trailing space in boast. 2015-08-13 12:30:08 +00:00
shm 7d14271c4e Extend AUTHORS section. Nobody likes a braggart.
OK mrg@
2015-08-13 09:00:29 +00:00
dholland b1828e0ba3 Hack up dinode usage to be 64 vs. 32 as needed. Part 1.
(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)
2015-08-12 18:28:00 +00:00
dholland e54b457c15 Provide 32-bit and 64-bit versions of FINFO.
This also entailed sorting out part of struct segment, as that
contains a pointer into the current FINFO data.
2015-08-12 18:27:01 +00:00
dholland 2e090556c4 Make 32-bit and 64-bit versions of SEGSUM.
Also fix some of the FINFO handling as it's closely entangled.
2015-08-12 18:26:26 +00:00
dholland 32577c4f1c Add IFILE32 and IFILE64 structures for the on-disk ifile entries.
Add and use accessors. There are also a bunch of places that cast and
I hope I've found them all...
2015-08-12 18:25:51 +00:00
dholland f11e4edeba Make 32-bit and 64-bit versions of CLEANERINFO.
XXX: while this is written to disk, it seems like much of it would
XXX: be better set up as a commpage shared with the cleaner.
2015-08-12 18:25:03 +00:00
dholland 17964a9f43 Fix assorted 64->32 truncations related to BLOCK_INFO.
Also make note of a cleaner limitation: it seems that when it goes to
coalesce discontiguous files, it mallocs an array with one BLOCK_INFO
for every block in the file. Therefore, with 64-bit LFS, on a 32-bit
platform it will be possible to have files large enough to overflow
the cleaner's address space. Currently these will be skipped and cause
warnings via syslog.

At some point someone should rewrite the logic to coalesce files to
use chunks of some reasonable size, as discontinuity between such
chunks is immaterial and mallocing this much space is silly and
fragile. Also, the kernel only accepts up to 65536 blocks at a time
for bmapv and markv, so processing more than this at once probably
isn't useful and may not even work currently. I don't want to change
this around just now as it's not entirely trivial.
2015-08-12 18:23:16 +00:00
shm c766c3d3c2 Use explicit_memset(3) instead of memset(3) to clear password 2015-08-10 07:45:50 +00:00
shm 92a992f213 Fix directory stream leaks 2015-08-10 07:32:49 +00:00
shm c09e755be0 Removed unnecessary memset(3) call 2015-08-09 20:34:24 +00:00
shm 0c7f5afe2e Clear utmpx struct before writing it to wtmpx files 2015-08-09 12:17:30 +00:00
mrg e8204d05c3 on QNX, use nbutil.h. 2015-08-05 06:50:44 +00:00
dholland 9e5184b86b Add a (draft) 64-bit superblock. Make things build again.
Add pieces of support for using both superblock types where
convenient, and specifically to the superblock accessors, but don't
actually enable it anywhere.

First substantive step on PR 50000.
2015-08-02 18:18:09 +00:00
dholland 992b9a23af Use accessor functions for the version field of the lfs superblock.
I thought at first maybe the cases that test the version should be
rolled into the accessors, but on the whole I think the conclusion on
that is no.
2015-08-02 18:14:16 +00:00
dholland 078ffcb8d8 Second batch of 64 -> 32 truncations in lfs, along with more minor
tidyups and corrections in passing.
2015-08-02 18:10:07 +00:00
dholland e6aad7b613 Use lfs_accessors.h in conjunction with the cleaner's struct clfs.
Remove previous hacks.
2015-07-28 05:14:23 +00:00
dholland 34f0d74c9e Add a new lfs header file: lfs_accessors.h.
This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
2015-07-28 05:09:34 +00:00
dholland adca8af59e More lfs superblock accessors.
(This changes the rest of the code over; all the accessors were
already added.)

The difference between this commit and the previous one is arbitrary,
but the previous one passed the regression tests on its own so I'm
keeping it separate to help with any bisections that might be needed
in the future.
2015-07-24 06:59:31 +00:00