Commit Graph

12722 Commits

Author SHA1 Message Date
christos 93da4522d3 appease gcc-4.5.4 2015-01-22 20:01:22 +00:00
gson 7a9652e2cb Retry read() on EINTR. Fixes premature exit of
</dev/random progress -e cat >/dev/null
2015-01-17 10:57:51 +00:00
mrg a1b1261ab6 do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.
2015-01-13 02:37:20 +00:00
christos eea786b46d Increase the buffer limit; otherwise files in:
http://www.taxdetective.ca/Samples/sampledatafiles.html

fail.
2015-01-12 14:17:08 +00:00
christos e8283fa6b1 fix wordexp result handling 2015-01-10 17:16:01 +00:00
christos ef0ab4422a fix incorrect arg size computation 2015-01-10 17:16:00 +00:00
prlw1 8707c3a333 Simplify code so that gcc 4.8 can understand it.
http://mail-index.netbsd.org/tech-userlevel/2015/01/06/msg008882.html
2015-01-09 12:45:32 +00:00
riastradh 3299a48014 Omit no longer existing l, m from default trace points. 2015-01-08 22:03:42 +00:00
christos 819d4545f4 Provide -C == -A + -B like fgrep, from Anon Ymous 2015-01-08 03:56:33 +00:00
christos f8128537a0 adjust to the netname4 prototype. 2015-01-07 22:43:01 +00:00
pooka 0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
joerg 1382c4d712 Don't depend on yacc skeleton to include sys/cdefs.h early. 2015-01-04 18:31:09 +00:00
joerg 6e60cc85b0 Mark debug_log as printf-like. 2015-01-03 22:57:54 +00:00
christos da9cda45ee don't shadow div(3) 2015-01-01 04:57:01 +00:00
mrg 4fe8b4e652 - this is midirecord(1) not midiorecord(1)
- add the -o handling to the getopt() and man page
- bump date
2014-12-30 18:52:47 +00:00
wiz 6fc026f9ce Sync usage with man page. 2014-12-30 12:14:34 +00:00
wiz bd9cac43f4 Describe -T. Sync SYNOPSIS with options. Sort options.
Remove trailing whitespace. Use more markup.
2014-12-30 12:10:07 +00:00
mrg 34602bc4ec only prev_div needs to be static.
add channel to some log messages.
2014-12-30 06:08:14 +00:00
mrg e2cc3fc481 install midirecord. 2014-12-30 04:22:18 +00:00
mrg 3f4db5ffea add a program to record midi files from /dev/music.
this doesn't process several potential result that netbsd does
not output on /dev/music, and should be largely complete for
our current sequencer(4).
2014-12-30 04:14:25 +00:00
mrg 9dd3b8ae69 add a decode_uint() function. 2014-12-30 01:22:09 +00:00
christos ad7787327b And correct it. 2014-12-26 12:45:57 +00:00
christos 1a965b8777 Correct the provenance of finger.1 and show the link that it was part of
2BSD (from Marcin F. Michalski)
2014-12-26 03:49:00 +00:00
christos f4b2cc8e89 Correct provenance of who(1) (from Marcin F. Michalski) 2014-12-26 01:43:58 +00:00
dennis 7ad3371ebc Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.
2014-12-24 20:01:21 +00:00
dennis 61933bb52e Move enough additional 'w' code into 'uptime' to keep the latter
from double-counting utmp users.
2014-12-22 15:24:14 +00:00
christos 2a8765d5a2 Fix various security related issues:
0001. Do not recognize paths, mail folders, and pipes in mail addresses
    by default.  That avoids a direct command injection with syntactically
    valid email addresses starting with |.

    Such addresses can be specified both on the command line, the mail
    headers (with -t) or in address lines copied over from previous
    while replying.

    This was assigned CVE-2014-7844 for some versions of BSD mailx.  It is
    documented behavior for Heirloom mailx, and was mentioned in an old
    technical report about BSD mailx (which does not usually make its way
    into operating system installations).  The patch switches off this
    processing and updates the documentation.

Added expandaddr option to explicitly enable this behavior.

    0002. When invoking sendmail, prevent option processing for email
    address arguments.  This prevents changing e.g. the Postfix
    configuration file in unexpected ways.  This behavior was documented for
    BSD mailx (sort of), but not for Heirloom mailx.  We did not assign a
    CVE to this because it is more of a missing feature, and code invoking
    mailx needs adjustment in the caller as well.

Fixed.

    0003. Make wordexp support mandatory.  (No functional change.)

Fixed (replaced explicit shell pipe implementation).

    0004. Prevent command execution in the expand function, which is IMHO
    unexpected.  (Not really required with patch 1, and there is still
    information disclosure/DoS potential if this expansion occurs.)  This is
    a historic vulnerability already fixed in the Debian package,
    retroactively assigned CVE-2004-2771:

Fixed (as part of the pipe replacement with wordexp).
2014-12-16 19:30:24 +00:00
uebayasi d8aa702d35 Revert debug code. Simplify. 2014-12-15 15:49:25 +00:00
uebayasi fc1f7728b8 config(1): Fix build of old trees (bin/49389) (take 2)
Look into sys/conf/Makefile.kern.inc to check if "build_kernel" .USE target
is defined.  If not (== old source trees), generate one on the fly.
2014-12-15 15:41:18 +00:00
uebayasi 10b064f35c config(1): Fix build of old tree (bin/49389)
Define the default, empty "build_kernel" target, so that old source trees,
whose sys/conf/Makefile.kern.inc don't have "build_kernel" .USE target, can
be built.

(When "build_kernel" is defined, the target is overriden, as far as
sys/conf/Makefile.kern.inc is included later than the "netbsd: ..." definition
in sys/arch/*/conf/Makefile.*.)

This should address PR bin/49389.
2014-12-15 10:10:24 +00:00
mrg 4023260255 redo the previous; avoid a bunch of processing when running as "uptime",
and as a side effect, avoid any name lookups.
2014-12-03 06:12:19 +00:00
christos 3f1eb4e425 if doing uptime, don't bother resolving names. 2014-12-02 22:19:19 +00:00
christos 938d39fd7f PR/49422: Ryo ONODERA: patch(1) cannot handle context diffs 2014-11-27 15:07:23 +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 59de200486 Avoid coredumps when the linenumbers in the hunks turn negative.
From: http://marc.info/?l=openbsd-tech&m=141693055412785

XXX: pullup 7
2014-11-26 00:31:32 +00:00
christos c8da6eb49b Use proper index types, delete casts, use correct sizeof() in allocations. 2014-11-21 20:46:56 +00:00
christos bf68803d37 allow c99 flexible arrays for packed structures. 2014-11-20 21:17:18 +00:00
christos caa0961bff Always set i_brace in the struct case.
Cleanup some debugging.
2014-11-20 20:49:06 +00:00
christos a6210a763e add LDEBUG 2014-11-20 20:48:33 +00:00
riastradh 9783666546 Fix vndcompress restart failure fallback when input is a pipe.
Defer seeking the *input* image, or winding it forward, until we are
certain we all ready in the cloop2 output, because when the input
image is a pipe, we don't get a chance to seek back to the beginning
and start from the top instead of restarting.

If restart does fail, don't try to seek the input image back to the
beginning unless we had already tried to seek or wind it forward.

Add some automatic tests for this and related cases.

XXX pullup to netbsd-7, netbsd-6
2014-11-18 03:48:17 +00:00
uebayasi 57751c8485 Pre-calc file path len/suffix. Misc. clean up. 2014-11-17 00:53:15 +00:00
uebayasi 9eb1865390 Fix oops in r1.30. 2014-11-16 15:10:54 +00:00
uebayasi d2824e0952 Simpfily code by assuming suffix is a single character. 2014-11-16 14:57:59 +00:00
uebayasi 8a0d672c53 Refactor. 2014-11-16 14:49:12 +00:00
uebayasi 20fd8a9d0f Consistently wrap long lines in ioconf.c. 2014-11-16 14:26:14 +00:00
uebayasi 73810e5d00 config(1): TODO about namespace (esp. options vs. module) 2014-11-16 07:12:34 +00:00
uebayasi 79fcd6c2d2 config(1): TODO item about swapnetbsd.c 2014-11-16 04:28:09 +00:00
uebayasi dfd51da465 config(1): Avoid buffer overrun (modular build) 2014-11-15 12:18:55 +00:00
uebayasi 70dd8e7d2a config(1): Sort objects by weight in modular build
Sort per-module kernel objects (*.ko) by dependency weight.  Important modules
are placed in lower addresses.  The ``machdep'' module will be always placed
in the lowest.

(At this moment, the order is not exact because dependency information is
incomplete in config files (files.*).  Thus ``sysmon_power.ko'' comes lower
than ``machdep.ko'' and/or ``uvm.ko''; but still much better than alphabetical
sort.)
2014-11-15 08:21:38 +00:00
uebayasi 2f06dcafd4 Revise a plan about link-set.
(I was ignorant 2 weeks ago.)
2014-11-13 15:25:48 +00:00