Commit Graph

11175 Commits

Author SHA1 Message Date
bapt
a372d7e311 getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG.
Submitted by:	Sascha Wildner <saw@online.de>
Obtained from:	DragonflyBSD
2015-10-22 06:32:33 +00:00
bdrewery
8db7e0379c MFC r288903:
Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.

  This does not match head as the code was rewritten significantly there.

Relnotes:	yes
2015-10-20 18:35:52 +00:00
trasz
a8182c4d10 MFC r287785:
Make it clear that 'swapuse' is swap reservation and not actual swap usage.

Sponsored by:	The FreeBSD Foundation
2015-10-18 15:03:47 +00:00
bdrewery
f8a9ff862c MFC r288266:
Add more SUBDIR_PARALLEL.
2015-10-13 18:56:50 +00:00
hselasky
8096b85f20 MFC r288335:
Store PID after becoming a daemon() and not before to ensure the
correct PID gets written to the PID file.

PR:		203252
2015-10-13 08:21:15 +00:00
peter
6a8fa4cab5 MFC: r269851,r272076,r274884,r282328,r285644,r286503,r286504,r286505,
r286506,r286510,r286561,r286562,r287034

Update svnlite from 1.8.10 to 1.8.14, and the support components:
serf->1.3.8, apr->1.5.2, apr-util->1.5.4, sqlite3->3.8.11.1

This includes syncing the developer templates with head.
2015-10-12 04:57:36 +00:00
mav
4a2038e9a9 MFC r288059: Bunch of improvements to ctlstat.
Add -p option to allow filtering by ports.
Make -l and -p options work in all modes as filters.
Improve output formatting to better fit columns.
2015-10-05 10:49:01 +00:00
mav
4add53bf36 MFC r288043:
Output times as normal microseconds, rather then in bintime format.
2015-10-05 10:48:14 +00:00
mav
656a5c3136 MFC r286806: Drop "internal" CTL frontend.
Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places.
2015-10-05 08:42:43 +00:00
bdrewery
d55e00843a MFC r288199,r288246:
Add missing CLEANFILES.
2015-10-03 16:01:16 +00:00
jhb
050b8bd1a6 MFC 283624,283630:
Export a list of VM objects in the system via a sysctl.  The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.
2015-10-01 17:09:20 +00:00
jhb
bbc4a5345e MFC 269727:
Update vmstat usage for last-argument count/wait parameters

Correct the usage in both the manpage and in usage() to indicate
that the wait interval and repetition count may be given either
with the respective -w/-c arguments, or as the final positional
arguments. [0]

The corresponding code to implement the positional arguments has
been conditional on the (always-enabled) BACKWARD_COMPATIBILITY
macro since the original 4.4-lite import.  It's no longer reasonable
to remove the functionality, so remove the macro and conditional
instead.

Note that multiple disks may be given on the command line.

While here, sort arguments and apply minor mdoc fixes.

PR:		184755 [0]
2015-09-30 00:11:06 +00:00
bdrewery
4432171c46 MFC r288154:
Similar to r266147, don't define PROG in the test subdirs.
2015-09-29 22:00:03 +00:00
emaste
a5313e9c06 MFC r286010: ar: enable deterministic mode by default
Ar cannot handle UIDs with more than 6 digits, and storing the mtime,
uid, gid and mode provides little to negative value anyhow for ar's
uses. Turn on deterministic (-D) mode by default; it can be disabled by
the user with -U.

Also MFC follow-on fixes in r286024 and r287324.

PR:		196929
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-09-25 00:23:36 +00:00
emaste
c472cfaaf0 MFC r287340: vtfontcvt: fix buffer overflow for non-default size .hex fonts
And r287336 which introduced xmalloc.

Sponsored by:	The FreeBSD Foundation
2015-09-24 13:06:19 +00:00
emaste
6dd9d3e499 MFC r282916: Add ELF machine EM_IAMCU, 32-bit Intel MCU
It is e_machine 6, which was previously reserved for 486.
2015-09-24 12:54:50 +00:00
emaste
5bfff19cb0 MFC r287327: ar: Deobfuscate a while loop 2015-09-24 12:47:31 +00:00
emaste
09f805e314 MFC r285841: Add RISC-V ELF machine type definition
EM_RISCV is now officially registered as e_machine 243.

Sponsored by:	The FreeBSD Foundation
2015-09-24 12:44:02 +00:00
delphij
1a5b0b1eee MFC r287634:
login.c doesn't really need libutil.h, don't include it.

login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes
paths.h.  Eliminate the paths.h inclusion in login_fbtab.c.
2015-09-24 00:54:46 +00:00
delphij
d812607618 MFC r287633:
- Avoid accessing window properties directly, instead, use accessors.
   This should be no-op for now, but allows the code to work if we
   move to NCURSES_OPAQUE.
 - Use calloc() instead of malloc+bzero.
2015-09-24 00:50:17 +00:00
delphij
0e2b30291c MFC r287590:
w(1) is not setgid binary since r53279, so remove the setgid() call.

Reviewed By:	wollman
2015-09-23 01:07:45 +00:00
pfg
af1f6583e1 MFC r286891, r286893:
calendar(1): add a few more dates to the Christian calendar

Bring some well established holidays that also happen to be legal
holidays in many Catholic countries.
2015-09-17 00:36:18 +00:00
delphij
9a0c37807b MFC r287320:
- uri is expected to be nul-terminated (strchr used later),
   so use strlcpy instead of strncpy.
 - replace the other two cases of strncpy+\0 with strlcpy.
2015-09-14 18:57:50 +00:00
delphij
3908360148 MFC r287319:
Constify opt_f and opt_t and eliminate unneeded copying.  This fixes
memory leaks.

Reported by:	clang static analyzer
2015-09-14 18:52:41 +00:00
hrs
c02639b794 MFC r287406:
Divide statistics in the number of packets with 1000 instead of 1024
in human-readable form.

PR:	183598
2015-09-09 08:40:17 +00:00
delphij
19493aa167 MFC r287123:
Finish r89633 and completely remove the remaining of VERSION.

PR:		bin/202308
Submitted by:	John Hein <z7dr6ut7gs snkmail com>
2015-09-08 02:02:08 +00:00
delphij
1d0f985306 MFC r287345:
Drop group privileges after opening the kvm descriptor, otherwise, the code
would not drop privileges as expected.

While there also add checks for the drop and bail out immediately if we
failed.
2015-09-04 00:41:29 +00:00
bapt
326626fa22 MFC: r268745,r268746,r268747,r268748,r268749,r268861,r268750,r268751,r268763
r273769,r273771,r276771,r278810

New BSDL timeout(1) utility compatible with GNU timeout

Relnotes:	yes
2015-09-02 05:45:47 +00:00
emaste
509a57d66e MFC r285844: ar: add -U (unique) option to disable -D (deterministic) mode
This is required in order for us to support deterministic mode by
default.  If multiple -D or -U options are specified on the command
line, the final one takes precedence.  GNU ar also uses -U for this.

PR:		196929
Sponsored by:	The FreeBSD Foundation
2015-08-31 17:30:13 +00:00
jilles
461d06c693 MFC r286344: find: Fix segfault with very long path in -exec/-ok ... {} \;.
If the resulting argument is longer than MAXPATHLEN, realloc() was called to
extend the space, but the new pointer was not correctly stored.

Different from what OpenBSD has done, rewrite brace_subst() to calculate the
necessary space first and realloc() at most once.

As before, the e_len fields are not updated in case of a realloc.
Therefore, a following long argument will do another realloc.

PR:		201750
2015-08-28 20:53:08 +00:00
delphij
aea92d2f4a MFC r281800 (pfg):
patch(1): small include changes.

Mostly to match OpenBSD, no functional change.

MFC r286601 + 286617:

use posix_spawn(3) instead of fork() and exec() manually as suggested
by jmg@.
2015-08-27 21:52:09 +00:00
marcel
d53cfebe2f MFC r286660, r286419, r286417, r286395, r286215, r284883
-   Add the ntfs alias
-   Fix the dynamic VHD format to work with qemu
-   Update manpage

MFH:
Differential Revision:
2015-08-25 04:03:51 +00:00
ed
473deb7c5c MFC r285742:
Unbreak "last reboot".

  According to the last(1) man page, the "reboot" pseudo-user should print
  all system reboot entries. This got broken by the utmpx import, as
  records are typed.

  Re-add support for "last reboot" by specifically matching against
  SHUTDOWN_TIME and BOOT_TIME records.

PR:           168844
Submitted by: matthew@
2015-08-20 08:34:13 +00:00
emaste
5264296ce4 MFC r285842: truss: follow pdfork()ed descendents with -f 2015-08-14 21:44:42 +00:00
pfg
2df02110dd MFC r286615:
Clean up some externally visible "more then" occurences
2015-08-14 02:45:22 +00:00
delphij
b64e10546f Fix patch(1) shell injection vulnerability via ed(1). [SA-15:18]
Fix routed remote denial of service vulnerability. [SA-15:19]
2015-08-05 22:05:02 +00:00
pfg
d396e4d373 MFC r286102:
Buffer overflow in wall(1).

This affected syslogd, wall and talkd.
Detected by FORTIFY_SOURCE GSoC (with clang).

Submitted by:		Oliver Pinter
Differential Revision:	https://reviews.freebsd.org/D3254
Reviewed by:		delphij, jmg
2015-08-04 03:06:23 +00:00
markj
25eb055781 MFC r285782:
Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).

PR:	201700
2015-07-31 00:21:40 +00:00
delphij
d3ecbb9019 Fix patch(1) shell injection vulnerability. [SA-15:14]
Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]
2015-07-28 19:58:44 +00:00
emaste
c94b5252c8 MFC r285248: lldb: use .PATH to find man page instead of symlinking it 2015-07-28 12:46:37 +00:00
hrs
881bea3791 MFC r284636:
- Add SOCK_SEQPACKET support in UNIX-domain socket.
- Display zoneid using % notation in an IPv6 address.
- Use nitems().
- Use sstos{in,in6,un} macros to simplify casts.
- style(9).

Approved by:	re (gjb)
2015-07-23 20:00:20 +00:00
gjb
70968cfdb6 MFC r285253 (hrs):
- Add IPv6 support in quota(1).  While rpc.rquotad has supported
   PF_INET6 for a long time, quota(1) utility supported only PF_INET.
 - Clean up confusing changes in f_mntfromname.
 - Add an entry for rquotad with rpc/udp6 to inetd.conf.

PR:		194084
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-20 21:52:05 +00:00
brueffer
332926e663 MFC: r285457
Don't claim c99 is a wrapper around gcc; it's a wrapper around the system
cc.

PR:             201303
Submitted by:   Bruce Cran
Approved by:    re (gjb)
2015-07-20 14:40:34 +00:00
brueffer
82ebd585a4 MFC: r285028
Add the year to the VAX-11/780 announcement entry.

PR:		200961
Submitted by:	John Marshall
Approved by:	re (gjb)
2015-07-13 13:42:05 +00:00
bapt
2ba8e41f9e MFC: r279597 (and 259152,259219 as dependency)
Make calendar(1) usable again. rework the calendar parser so that it is
compatible with documented format:

Support includes surrounded by '"' or '<' '>'
Print warnings about bad syntax
Correctly navigate through include directories to find calendar files
Correctly support multiple includes

While here:

MFC: 262011 (by eadler)

calendar(1): don't segfault in invalid input

When the user supplies an invalid number of days provide a useful error message
instead of segfaulting.

Approved by:	re (gjb)
2015-07-08 21:06:19 +00:00
emaste
46c04bda42 MFC r284928: speed up ar(1) on UFS file systems
Fault in the buffer prior to writing to workaround poor performance due
to interaction with kernel fs deadlock avoidance code. See the comment
prior to vn_io_fault_doio() in sys/kern/vfs_vnops.c for details of the
issue.

On my stable/10 desktop with a 16MB obj.o and "ar r out.a obj.o" I see
the following run times (seconds):

x ar.r284891
+ ar.patched
+----------------------------------------------------------------------+
|+                                                                     |
|+                                                                    x|
|+                                                                   xx|
|A                                                                   |A|
+----------------------------------------------------------------------+
    N         Min          Max        Median           Avg        Stddev
x   3       1.307        1.321         1.315     1.3143333  0.0070237692
+   3       0.020        0.023         0.022   0.021666667  0.0015275252
Difference at 95.0% confidence
        -1.29267 +/- 0.0115203
        -98.3515% +/- 0.876513%
        (Student's t, pooled s = 0.00508265)

Thanks to kib for diagnosing and explaining the issue and suggesting
the workaround.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2015-07-07 02:17:24 +00:00
garga
d2118e7c17 MFC r265096:
Fix "netstat -gW" behavior broken in r259638.
netstat has two options for printing multicast tables:
sysctl (the default one for live systems) and kvm-based one (for cores).
It looks like kvm-based one hasn't been working since it's been introduced
in r190012 due to absence of mfctablesize kernel symbol.
Check for all ipv4-multicast symbols being correctly resolved was introduced
in r259638 regardless of 'live' value leading to "No IPv4 MROUTING" error
message.

Reported by:	Olivier Cochard-Labbé
Approved by:	melifaro@
Sponsored by:	Netgate
2015-07-02 10:31:08 +00:00
des
1bc136b874 MFH (r277695): allow tracing dlfunc() / dlsym() events 2015-06-30 14:17:02 +00:00
marcel
c8b4a5d462 MFC r284269, r284270, r284655, r284656, r284658:
VHD fixes for Microsoft Azure:
1.  Round the image size to the VHD geometry and then round to a
    multiple of 1MB.
2.  Change the creator OS from "FBSD" to "Wi2k". It matters...
3.  Bump the VHD tool version and the mkimg version.

Approved by:	re (gjb)
2015-06-24 18:40:34 +00:00
brueffer
cb122c6c8e MFH: r284249
Correct Hawaii's admission day.

PR:		192651
2015-06-24 12:19:11 +00:00