Commit Graph

9808 Commits

Author SHA1 Message Date
riastradh
212c8238ec Fix rcsid comment. 2014-12-11 21:54:13 +00:00
pooka
dc3c2e9560 Add two more Makefile conditionals required for RUMPRUN=yes
* do not build _errno.c (different thread/tls handling)
 * do not build either phk- or jemalloc (different backing page allocation)

Somehow I missed these in the previous commit, but now libc built with
RUMPRUN=yes works also with rumprun-posix, so there's reasonably high
confidence that I didn't miss anything anymore.
2014-12-10 16:55:54 +00:00
pooka
a17684a24c Add hooks for RUMPRUN build of libc
If "yes", does the following (default "no"):
  * prevents ASM syscalls from being built (librump provides syscalls)
  * does not include compat (useless when application is linked with libc)
  * does not build tags (no /var/db to install them to)
  * does not include tls

==> libc for rumprun can now be built against unmodified NetBSD sources
2014-12-10 00:37:30 +00:00
enami
11fe7239df Changes done in rsh.c rev. 1.36 was incomplete. As chuq pointed
in private mail, it broke rcp(1).

To achieve the documented behavior and to fix long standing incorrect
rsh(1) behavior which I've tried to fix in rev. 1.36, rcmd(1) should have
two operation mode; whether it should relay signal information on
auxiliary channel or not, depending on the argument `fd2p' passed to rcmd(3).
So, make rcmd(1) behave differntly depending on the environment variable and
set it when necessary in rcmd(3) according to how auxiliary channel
is set up by rcmd(3).
2014-11-26 23:44:21 +00:00
christos
fa438ee608 - Use O_DIRECTORY to open the file, so that we don't need to stat() after
that.
- Move the stat() call to fdopendir() and change it's error handling so that
  it does not hide errors.
- According to POSIX, fdopendir() transfers ownership of the fd only on
  success, so don't close it on failure. XXX: We still make it non-blocking
  on failure, but that's nitpicking.

XXX: pullup-7?
2014-11-26 16:48:43 +00:00
christos
94783bbf05 knf, no functional change. 2014-11-24 15:43:21 +00:00
christos
8a88bf6a6c Don't read past the end when the data is exactly the right size. Reported
by tedu @ openbsd in tech-userlevel. Thanks!
2014-11-24 15:41:18 +00:00
christos
625ac095d3 Fix ptrace %rcx corruption when pthread_errno() is used. Small example:
#include <sys/types.h>
    #include <stdio.h>
    #include <sys/ptrace.h>
    int main(void) { ptrace(18, getpid(), NULL, 0xabcd); }
The -lpthread cases pases 0 instead of 0xabcd
2014-11-24 15:33:18 +00:00
christos
6ced7fd882 welcome to 2014j 2014-11-18 01:58:59 +00:00
riastradh
b1fb140d0e Tweak wording, define `output', remove misplaced scaremongering. 2014-11-17 18:41:29 +00:00
riastradh
d8a3efd656 Fix Google Groups link. 2014-11-17 15:28:22 +00:00
wiz
7a50617bac Remove unnecessary Ns before punctuation. Fix a line. 2014-11-17 15:17:41 +00:00
riastradh
e8e4197773 Cross-reference rnd(4). 2014-11-17 15:08:37 +00:00
riastradh
28464c9ad0 Markup for BUGS note about arc4random_uniform. 2014-11-17 15:06:59 +00:00
riastradh
e8af01c56b Amplify comment about how quickly RC4 was known to be bad. 2014-11-17 15:05:12 +00:00
riastradh
eed04e6bf8 Ruminate on security model choices and API design in arc4random(3). 2014-11-17 07:11:00 +00:00
riastradh
ac8077340f Note relation of arc4random(3) to rand(3)/random(3). 2014-11-17 06:37:23 +00:00
wiz
746186406b Grammar. 2014-11-16 20:37:35 +00:00
riastradh
0e26ad0818 Rewrite arc4random(3) with ChaCha20-based PRNG and per-thread state.
Explain the security model in the man page.

No more RC4!

XXX pullup to netbsd-6, netbsd-5
2014-11-16 20:33:04 +00:00
christos
5988775b41 Don't try to extend the offset range on 32 bit machines by treating negative
offsets as positive. It is just confusing.
2014-11-16 20:32:52 +00:00
wiz
57a81568cf bump year 2014-11-14 22:46:34 +00:00
riastradh
995f5ce060 Commit to returning 1, not any nonzero value. 2014-11-14 16:43:57 +00:00
christos
b95700c1f3 localtime did not set tm->tm_zone properly making pkgsrc emacs core-dump.
Thanks to Masanori Kanaoka.
2014-11-11 18:46:54 +00:00
njoly
9425d53a52 Do not hardcode values for ENAMETOOLONG, use symblic constants. 2014-11-11 08:10:02 +00:00
christos
ff104b2e4b PR/48475: YAMAGUCHI Takanori: EDNS option broken with unbound. struct
querybuf in net/gethnamaddr.c defines MAXPACKET to 64K. This in turn
gets passed down until it reached res_nopt(..., answer, anslen), where
the size of the buffer must fit in 16 bits. Unfortunately we end up
being one more than the max so we end up sending a 0 as the size and
unbound does not like that. Instead we clip now to 64K - 1, and everyone
is happy.
XXX: Pullup to 7.
2014-11-11 03:29:24 +00:00
njoly
294822e1e1 Use more markups in AUTHORS section. 2014-11-02 11:28:03 +00:00
christos
a5a71196c8 PR/49317: Henning Petersen: Fix prototypes inman page. 2014-10-26 14:19:28 +00:00
christos
0a409b4552 remove stray endif 2014-10-23 21:19:53 +00:00
christos
67431d7357 merge 2014i 2014-10-23 18:45:58 +00:00
njoly
0df29bec99 Do not use hard-coded values with ENAMETOOLONG, use symbolic constants
instead.
2014-10-19 16:47:51 +00:00
justin
7cbb46f7c6 Add negative offset checks to fseeko
These were not strictly needed before, as lseek would error on negative
arguments, but having added open_memstream we have a virtual file pointer
that assumes that it gets sane values, so we get an assertion triggered
on a negative value. Best to check in one place rather than at all the
relevant points.
2014-10-19 11:17:43 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos
5b3acd55fe - don't leak errno in mktime()
- when we load a new timezone, don't change anything unless the load succeeded.
2014-10-16 17:53:32 +00:00
christos
355ccc569e PR/49284: Andreas Gustafsson: sysinst segfaults when configuring network
manually. When tzload() fails called from zoneinit(), when trying to set the
local timezone for the first time in tzsetlcl(), we end up with a lclptr
that contains garbage, so settzname() core-dumps.

Thanks Andreas for the analysis!
2014-10-15 15:13:45 +00:00
christos
0230240a4a improve error checking (setting errno) 2014-10-14 20:35:40 +00:00
wiz
7ed90a21cf Fix whitespace in Xr. Remove sbuf(3) Xr, we do not have that. 2014-10-13 22:41:59 +00:00
christos
3483aef36d bump for open_{,w}memstream. 2014-10-13 00:40:57 +00:00
christos
dfe69df4d4 PR/49279: Justin Cormack: add open_memstream 2014-10-13 00:40:36 +00:00
christos
02807d50d6 Fix fnmatch issues according to POSIX.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/\
xcu_chap02.html#tag_02_13_01
1. A [...] pattern containing a slash is not a pattern; the [ ]'s become regular
   characters
2. A [] or a [!] is not an empty pattern, why would it? The first would never
   match and the second would always match which makes it equivalent to ?
   In those cases the ] is taken as a literal character and does not have
   special meaning.
2014-10-12 22:32:33 +00:00
njoly
0ab951a98a Note that rmdir(2) fails with EINVAL when the path last component is
`.' (dot).
2014-10-11 12:06:58 +00:00
njoly
fd871e46ea Use '.Rv -std' for RETURN VALUES, sort ERRORS. 2014-10-11 11:50:11 +00:00
martin
6a83d78f0f Make yeartot() declaration match prototype. 2014-10-08 13:13:34 +00:00
msaitoh
293393def8 Fix typo. 2014-10-08 05:44:03 +00:00
christos
c3777759a4 don't define functions we define in our own headers 2014-10-07 22:20:33 +00:00
christos
6eda9e7a82 Fix backslashes 2014-10-07 22:20:17 +00:00
christos
d953dfb290 remove version stuff 2014-10-07 22:14:46 +00:00
christos
1f6103b179 Sync with tzcode2014h 2014-10-07 21:51:03 +00:00
apb
776c903d9b include "nbtool_config.h", not "nbtools_config.h". 2014-10-01 13:53:04 +00:00
apb
f685c2f61e It's HAVE_NBTOOL_CONFIG_H, not HAVE_NBTOOLS_CONFIG_H 2014-10-01 12:55:39 +00:00
christos
6eac8b28cf toolize 2014-09-30 17:59:06 +00:00