Commit Graph

12031 Commits

Author SHA1 Message Date
emaste
32e34ac2b5 Allow ELF Tool Chain elfcopy to be installed as objcopy
ELF Tool Chain elfcopy is nearly a drop-in replacement for GNU objcopy,
but does not currently support PE output which is needed for building
x86 UEFI bits.

Add a src.conf knob to allow installing it as objcopy and set it by
default for aarch64 only, where we don't have a native binutils.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2887
2015-07-29 18:45:38 +00:00
emaste
e700d1d058 ar: Fix deterministic mode default with options other than -q or -r
Reported by:	jhibbits
Reviewed by:	jhibbits
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3237
2015-07-29 17:34:26 +00:00
emaste
25c00d1c25 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.

PR:		196929
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3190
2015-07-29 13:36:17 +00:00
araujo
03740b1f15 Compilers will complain the usage of obsolescent variable declarations.
Also it will fix the build problem with sparc64.

Submitted by:	ed@
2015-07-29 02:21:35 +00:00
delphij
33661d0781 Fix shell injection vulnerability in patch(1) and drop SCCS
support by replacing system() with execve().

Future revisions may remove the functionality completely.

Obtained from:	Bitrig
Security:	CVE-2015-1416
2015-07-28 19:58:36 +00:00
araujo
fafebceb9b Staticfy and constify some variables and clean up the code a bit to make it
more readable. No functional change.

Differential Revision:	D3166
Reviewed by:		kib
Sponsored by:		gandi.net
2015-07-28 02:32:40 +00:00
dim
c38a9a5a20 Merge ^/head r285793 through r285923. 2015-07-27 22:20:28 +00:00
delphij
b19c7b1b4d Rewrite scan procedure with a FSM. This improves code readability by
making clear transits between different states, and avoids bug with
handling repeated $'s.

Reviewed by:	bapt
Differential Revision: https://reviews.freebsd.org/D3221
2015-07-27 19:21:23 +00:00
bapt
58df5d4a52 Replace GNU RCS ident with a BSD license ident
Rationale: ident(1) is useful out of RCS, lot of scripts are using ident(1) and
failing when base is built WITHOUT_RCS.

This version is:
- fully compatible with RCS 5.7 ident.
- fully compatible with RCS 5.9 ident.
- passes all ident test from GNU RCS 5.9 test suite

This version has support for: svn extension for the Keyword id (double colon and
# before last $)

Différences with GNU RCS ident:
- no long options as found in GNU RCS 5.9 (but not commented there).
- '-V' reports nothing but has been added for compatibility.

Differential Revision:	https://reviews.freebsd.org/D3200
Reviewed by:	pfg
2015-07-26 11:21:36 +00:00
pfg
759686c03c Bump GCC max-inline-insns-single in libiconv_modules and grep
This is required by our FORTIFY_SOURCE implementation as it
does more inlining. As a rule of thumb, FORTIFY_SOURCE doubles
the number  of inlines except that in grep inlining
blows up for some reason.
2015-07-26 00:11:04 +00:00
emaste
c58042ff07 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.

An equivalent change will be applied to ELF Tool Chain's version of ar.

PR:		196929
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3175
2015-07-24 17:46:43 +00:00
emaste
0d16c6f74f truss: follow pdfork()ed descendents with -f
PR:		201276
Reported by:	David Drysdale
Reviewed by:	oshogbo
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2976
2015-07-24 16:57:13 +00:00
emaste
faf3fc6a75 Add RISC-V ELF machine type definition
EM_RISCV is now officially registered as e_machine 243.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-07-24 16:52:21 +00:00
bapt
883b6dee61 inode should be different to actually mean mandocdb is in used
Sponsored by:	gandi.net
2015-07-24 09:20:02 +00:00
bapt
eaa94ad7a3 Fix man -k with mandocdb
If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is
using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly

Reported by:	kevlo
Tested by:	kevlo
Sponsored by:	gandi.net
2015-07-24 09:10:03 +00:00
dim
56628666d9 Merge ^/head r285341 through r285792. 2015-07-22 19:55:32 +00:00
markj
e613eb38bc Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).
In the kernel, structs such as tcpstat are manipulated as an array of
counter_u64_t (uint64_t *), but made visible to userland as an array of
uint64_t. kread_counters() was previously copying the counter array into
user space and sequentially overwriting each counter with its value. This
mostly affects IPsec counters, as other counters are exported via sysctl.

PR:		201700
Tested by:	Jason Unovitch
MFC after:	1 week
2015-07-21 23:57:38 +00:00
cem
fa03c1678b patch(1): Add -Vnone option to disable backup files
Differential Revision:	https://reviews.freebsd.org/D3146
Reviewed by:	pfg
Approved by:	markj (mentor)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
2015-07-21 22:57:27 +00:00
ed
b875818639 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@
MFC after:	1 month
2015-07-21 10:52:05 +00:00
markj
d3a143e13f Fix some libxo format string errors in the pfkey stats code.
PR:	201700
2015-07-20 02:38:51 +00:00
des
8e2e593b27 Move assignments around to avoid a false-positive uninitialized variable
warning which broke the sparc64 build.

PR:		201585
MFC after:	3 weeks
2015-07-17 08:37:13 +00:00
des
68a5fdd04b Add a -s option which adds a column listing the connection state if
applicable (currently only for TCP).

PR:		201585
MFC after:	3 weeks
2015-07-16 13:09:21 +00:00
bapt
f5525a768b Fix trimming spaces writing at index -1 if an empty string is passed
Submitted by:	Gennady Proskurin <gprspb@mail.ru>
2015-07-15 18:49:15 +00:00
jmg
9bde258984 fix error message... errx since errno may not be set (if we didn't
parse the full field), and err and errx add their own newline at the
end...

Sponsored by:	Netflix, Inc.
2015-07-15 06:14:04 +00:00
joel
a6005902ef mdoc: add missing .El 2015-07-14 19:43:10 +00:00
bapt
d2f1cdda38 Convert atoi(3) to stronum(3) which allows to arguments and report proper errors
to the users

Obtained from:	OpenBSD
2015-07-14 19:16:14 +00:00
markm
7a0fcb2ab4 Widen the host field so that a full IPv6 address will be seen. 2015-07-14 18:53:24 +00:00
brueffer
15e50c23e5 Don't claim c99 is a wrapper around gcc; it's a wrapper around the system cc.
PR:		201303
Submitted by:	Bruce Cran
MFC after:	1 week
2015-07-13 14:13:15 +00:00
adrian
41db4b88e0 Add an initial NUMA affinity/policy configuration for threads and processes.
This is based on work done by jeff@ and jhb@, as well as the numa.diff
patch that has been circulating when someone asks for first-touch NUMA
on -10 or -11.

* Introduce a simple set of VM policy and iterator types.
* tie the policy types into the vm_phys path for now, mirroring how
  the initial first-touch allocation work was enabled.
* add syscalls to control changing thread and process defaults.
* add a global NUMA VM domain policy.
* implement a simple cascade policy order - if a thread policy exists, use it;
  if a process policy exists, use it; use the default policy.
* processes inherit policies from their parent processes, threads inherit
  policies from their parent threads.
* add a simple tool (numactl) to query and modify default thread/process
  policities.
* add documentation for the new syscalls, for numa and for numactl.
* re-enable first touch NUMA again by default, as now policies can be
  set in a variety of methods.

This is only relevant for very specific workloads.

This doesn't pretend to be a final NUMA solution.

The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by
'sysctl vm.default_policy=rr'.

This is only relevant if MAXMEMDOM is set to something other than 1.
Ie, if you're using GENERIC or a modified kernel with non-NUMA, then
this is a glorified no-op for you.

Thank you to Norse Corp for giving me access to rather large
(for FreeBSD!) NUMA machines in order to develop and verify this.

Thank you to Dell for providing me with dual socket sandybridge
and westmere v3 hardware to do NUMA development with.

Thank you to Scott Long at Netflix for providing me with access
to the two-socket, four-domain haswell v3 hardware.

Thank you to Peter Holm for running the stress testing suite
against the NUMA branch during various stages of development!

Tested:

* MIPS (regression testing; non-NUMA)
* i386 (regression testing; non-NUMA GENERIC)
* amd64 (regression testing; non-NUMA GENERIC)
* westmere, 2 socket (thankyou norse!)
* sandy bridge, 2 socket (thankyou dell!)
* ivy bridge, 2 socket (thankyou norse!)
* westmere-EX, 4 socket / 1TB RAM (thankyou norse!)
* haswell, 2 socket (thankyou norse!)
* haswell v3, 2 socket (thankyou dell)
* haswell v3, 2x18 core (thankyou scott long / netflix!)

* Peter Holm ran a stress test suite on this work and found one
  issue, but has not been able to verify it (it doesn't look NUMA
  related, and he only saw it once over many testing runs.)

* I've tested bhyve instances running in fixed NUMA domains and cpusets;
  all seems to work correctly.

Verified:

* intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different
  NUMA policies for processes under test.

Review:

This was reviewed through phabricator (https://reviews.freebsd.org/D2559)
as well as privately and via emails to freebsd-arch@.  The git history
with specific attributes is available at https://github.com/erikarn/freebsd/
in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy).

This has been reviewed by a number of people (stas, rpaulo, kib, ngie,
wblock) but not achieved a clear consensus.  My hope is that with further
exposure and testing more functionality can be implemented and evaluated.

Notes:

* The VM doesn't handle unbalanced domains very well, and if you have an overly
  unbalanced memory setup whilst under high memory pressure, VM page allocation
  may fail leading to a kernel panic.  This was a problem in the past, but it's
  much more easily triggered now with these tools.

* This work only controls the path through vm_phys; it doesn't yet strongly/predictably
  affect contigmalloc, KVA placement, UMA, etc.  So, driver placement of memory
  isn't really guaranteed in any way.  That's next on my plate.

Sponsored by:	Norse Corp, Inc.; Dell
2015-07-11 15:21:37 +00:00
dim
91db3ac96d Merge ^/head r285153 through r285283. 2015-07-08 18:43:55 +00:00
hrs
61259e66f8 - 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
2015-07-07 20:15:09 +00:00
emaste
7259ef9e7d lldb: use .PATH to find man page instead of symlinking it
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-07 18:46:41 +00:00
dim
706271a799 Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
dim
6f44bd3256 Merge ^/head r284737 through r285152. 2015-07-04 21:50:39 +00:00
emaste
cea4c16751 Update LLDB snapshot to upstream r241361
Notable upstream commits (upstream revision in parens):

- Add a JSON producer to LLDB (228636)
- Don't crash on bad DWARF expression (228729)
- Add support of DWARFv3 DW_OP_form_tls_address (231342)
- Assembly profiler for MIPS64 (232619)
- Handle FreeBSD/arm64 core files (233273)
- Read/Write register for MIPS64 (233685)
- Rework LLDB system initialization (233758)
- SysV ABI for aarch64 (236098)
- MIPS software single stepping (236696)
- FreeBSD/arm live debugging support (237303)
- Assembly profiler for mips32 (237420)
- Parse function name from DWARF DW_AT_abstract_origin (238307)
- Improve LLDB prompt handling (238313)
- Add real time signals support to FreeBSDSignals (238316)
- Fix race in IOHandlerProcessSTDIO (238423)
- MIPS64 Branch instruction emulation for SW single stepping (238820)
- Improve OSType initialization in elf object file's arch_spec (239148)
- Emulation of MIPS64 floating-point branch instructions (239996)
- ABI Plugin for MIPS32 (239997)
- ABI Plugin for MIPS64 (240123)
- MIPS32 branch emulation and single stepping (240373)
- Improve instruction emulation based stack unwinding on ARM (240533)
- Add branch emulation to aarch64 instruction emulator (240769)
2015-07-04 01:02:43 +00:00
gnn
ea302f3ee6 New AES modes for IPSec, user space components.
Update setkey and libipsec to understand aes-gcm-16 as an
encryption method.

A partial commit of the work in review D2936.

Submitted by:	eri
Reviewed by:	jmg
MFC after:	2 weeks
Sponsored by:	Rubicon Communications (Netgate)
2015-07-03 20:09:14 +00:00
oshogbo
55d9527633 Let the nv.h and dnv.h includes be only in sys directory.
Change consumers to include those files from sys.
Add duplicated files to ObsoleteFiles.

Approved by:	pjd (mentor)
2015-07-02 21:58:10 +00:00
brueffer
5d3547e496 Add the year to the VAX-11/780 announcement entry.
PR:		200961
Submitted by:	John Marshall
MFC after:	1 week
2015-07-02 12:08:05 +00:00
jhibbits
5fcd241a6c The LDFLAGS isn't needed, and breaks the build on powerpc64.
This hack is very fragile, and was broken on powerpc64 when metamode was
introduced.  Removing it survives a buildworld for all architectures, and
fixes the build on powerpc64.
2015-06-30 06:02:42 +00:00
emaste
56f61c7a15 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.

Reviewed by:	eadler, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2933
2015-06-29 13:48:44 +00:00
jmmv
60e4da1015 Only initialize libedit when necessary
The code path to support units conversions from the command line
need not initialize neither libedit nor the history.  Therefore, only do
that when in interactive mode.

This hides the issue reported in PR bin/201167 whereby running commands
of the form 'echo "$(units ft in)"' would corrupt the terminal.  The real
issue causing the corruption most likely still remains somewhere.

PR:		bin/201167
Differential Revision:	D2935
Reviewed by:	eadler
2015-06-28 16:43:07 +00:00
marcel
60975209ae Add the ntfs alias and support it with the MBR and GPT schemes
as DOSPTYP_NTFS and GPT_ENT_TYPE_MS_BASIC_DATA (resp).
2015-06-27 03:28:04 +00:00
bapt
1a23485db6 short circuit install -l rs
When requesting install(1) to only make relative symlinks, by pass all the
done to actually compute the relative symlink if the path given in argument is
already a relative path
2015-06-26 23:55:02 +00:00
dim
1756896fd2 Merge ^/head r284644 through r284736. 2015-06-23 18:55:08 +00:00
dim
3aff6c77e3 Update llvm/clang build glue. 2015-06-23 18:46:29 +00:00
marcel
5137627841 Rebase after r284658:
1.  Change creator OS to "wi2k"
2.  Bump tool version to 2.0
2015-06-21 02:55:25 +00:00
marcel
dd8725551f Microsoft Azure expects the creator OS to be "Wi2k" and not "FBSD".
The image is not accepted for provisioning otherwise. Bump the
VHD creator tool version and the version of mkimg to signify our
success in provisioning.

Note that this also imapcts the dynamic VHD images.

Tested by: gjb@
2015-06-21 02:45:31 +00:00
marcel
c1f494dd74 Rebase the fixed VHD images after the rounding fix. 2015-06-21 01:55:01 +00:00
marcel
149795a98a Microsoft Azure demands that fixed VHD images are a whole number
of megabytes. This is on top of having the image rounded to the
matching geometry of the image size.
By rounding up to the next MB after rounding to the geometry, we
lost idempotency. Subsequent calls to resize the image will keep
increasing the image size.

Tested by: gjb@
2015-06-21 01:44:27 +00:00
marcel
162b419db0 Don't resize again prior to writing. Resizing may not be idempotent
and no scheme adjusts the size after the format resized the image
the first time.
2015-06-21 01:35:32 +00:00
dim
e109f99dcb Merge ^/head r284188 through r284643. 2015-06-20 19:34:50 +00:00
hrs
00e1fe8fff - 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).
2015-06-20 08:59:50 +00:00
tuexen
7f71799261 Don't leak sockets.
Reported by:	Coverity
CID:		1306785

MFC after:	3 days
2015-06-19 19:36:29 +00:00
tuexen
fc90da5446 Fix a bug reported by coverity. Since AF_UNIX sockets don't
have multiple addresses, the problem didn't show up during testing.

Reported by:	Coverity
CID:		1306787
2015-06-18 13:45:07 +00:00
acm
4aa7580956 - Add acm@ entry 2015-06-17 02:43:20 +00:00
sjg
852129abd1 new depends 2015-06-16 23:37:19 +00:00
imp
ebcb5143a5 Remove old fmake. It wasn't built by default for some time. Users that
really need it can find it in the devel/fmake port or pkg install fmake.
Note: This commit is orthogonal to the question 'can we fmake buildworld'.

Differential Revision: https://reviews.freebsd.org/D2840
2015-06-16 20:58:33 +00:00
sjg
d49ccf4e10 Remove extra blank lines 2015-06-15 22:04:29 +00:00
bapt
9efdecaac9 Convert to LIBADD 2015-06-15 21:20:52 +00:00
sjg
3f58070b3a Pay attention to MK_ELFTOOLCHAIN_TOOLS so we build the desired tools. 2015-06-15 20:11:15 +00:00
rodrigc
0f8ae6e2c7 Add ioctl.c, linux_syscalls.c, linux32_syscalls.c to beforedepend target.
These files need to be generated before mkdep is run.
2015-06-15 06:48:43 +00:00
rodrigc
e822fdb383 Use cpp -I$includedir
"cpp -I$1" was expanding to "cpp -Iprint"
which was not the proper directory
of header files.
2015-06-15 06:44:22 +00:00
sjg
f29bbde822 NO_WARNS when building for host 2015-06-14 03:34:09 +00:00
sjg
5a458f85ac Need to provide -I for meta mode 2015-06-14 03:32:49 +00:00
sjg
4307cae51d Create proper targets for linux*syscalls.c 2015-06-14 03:30:39 +00:00
tuexen
970120bd68 When using -L the code skips a socket if the local or foreign
address is loopback. So it is shown if both are not loopback.
The man page says that it is shown if the local or foreign
address is not loopback. Change the man page to reflect the
code.

MFC after: 3 days
2015-06-13 20:15:44 +00:00
tuexen
999c2a5123 Add support for SCTP.
MFC after: 3 days
2015-06-13 20:11:02 +00:00
tuexen
71580aec19 Allow more than one local or remote address per socket. This is needed to
support SCTP (and MPTCP in the future). No functional change for existing
protocols.

MFC after: 3 days
2015-06-13 20:05:20 +00:00
tuexen
300f572dc3 Allow more than one socket entry for a file descriptor. This is needed
for supporting 1-to-many style SCTP sockets. For other sochets, there
is no functional change.

MFC after: 3 days
2015-06-13 20:01:54 +00:00
tuexen
199422d7cb Simplify printaddr(). No functional change.
MFC after: 3 days
2015-06-13 19:56:04 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
750b155101 Misc fixes from projects/bmake
Differential Revision:       D2748
Reviewed by: brooks imp
2015-06-11 21:13:05 +00:00
marcel
aa01f50402 Update tests after sizing changes to the fixed VHD format. 2015-06-11 15:19:59 +00:00
marcel
d7cd5ce73a Handle the case in which ncyls is 0.
While here, update copyright.
2015-06-11 15:18:54 +00:00
marcel
7577833480 For the fixed VHD format, round the raw image size to the next
multiple of the cylinder size. This is what qemu-img seems to
be doing. Make sure to handle boundary cases where increasing
the image size by 1 cyclinder's worth would also result in a
change of geometry.
2015-06-11 14:30:31 +00:00
sjg
f9107fd070 Use INCLUDEDIR rather than hard coded /usr/include
Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 14:25:53 +00:00
sjg
cead8270d4 Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
sjg
d1ba9a9c79 Merge bmake-20150606
Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

_M   contrib/bmake
M    contrib/bmake/ChangeLog
M    contrib/bmake/Makefile
M    contrib/bmake/bmake.1
M    contrib/bmake/bmake.cat1
M    contrib/bmake/make.1
M    contrib/bmake/mk/ChangeLog
M    contrib/bmake/mk/dirdeps.mk
M    contrib/bmake/mk/gendirdeps.mk
M    contrib/bmake/mk/install-mk
M    contrib/bmake/mk/meta.stage.mk
M    contrib/bmake/mk/meta.sys.mk
M    contrib/bmake/mk/mkopt.sh
M    contrib/bmake/targ.c
M    usr.bin/bmake/Makefile
2015-06-11 04:00:22 +00:00
brueffer
bf58779d77 Correct Hawaii's admission day.
PR:		192651
MFC after:	1 week
2015-06-11 00:12:33 +00:00
dim
238df27d05 Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r239412.
2015-06-10 19:12:52 +00:00
dim
6370dd4a2c Merged ^/head r283871 through r284187. 2015-06-09 19:14:27 +00:00
sjg
7d17ddfb84 Avoid bogus MLINKS when MK_LZMA_SUPPORT=yes and MK_BSD_GREP=no 2015-06-08 23:37:17 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
marcel
3f1876f2b9 Move contrib/top/top.X to contrib/top/top.xs and move
contrib/top/top.local.H to contrib/top/top.local.hs.
This fixes a build breakage when src is on a case-
insensitive file system -- we never properly create
top.x nor top.local.h. Change the makefile accordingly.

MFC after:	3 days
2015-06-08 19:45:24 +00:00
bapt
cc55e3a9e2 Readd the warning level gcc 4.2 still complains 2015-06-06 19:43:41 +00:00
bapt
6720ff676c Add const to the copyright variable
Bump WARNS to level 2
2015-06-06 13:13:39 +00:00
bapt
c910801d6a Remove WARNS keylogin build fine with clang and gcc 2015-06-06 13:09:49 +00:00
bapt
c9f807f38c Bump WARNS level to 1 2015-06-06 13:08:48 +00:00
bapt
ba5722b48c Remove unused variable 2015-06-06 13:08:31 +00:00
bapt
ae79c86934 Make global variables static
Remove WARNS from Makefile
2015-06-06 12:43:05 +00:00
bapt
a1c5faa852 Bump level WARNINGS to 3 2015-06-06 12:41:25 +00:00
bapt
b1936bdf89 Make global variables static
Remove WARNS from Makefile
2015-06-06 12:39:00 +00:00
bapt
f16e9cfbf7 Remove WARNS vtfontcvt builds find with clang and gcc with maximum level warning 2015-06-06 12:34:59 +00:00
bapt
5dab546bef Fix history 2015-06-06 12:10:10 +00:00
bapt
3bd93a83e6 Fix HISTORY and add AUTHORS section
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:08:10 +00:00
bapt
db6d602814 Fix history, add AUTHORS section
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:04:38 +00:00
bapt
a0ca8453de Complete documenting the HISTORY
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:01:35 +00:00
bapt
417267fa30 Fix history (appeared in 1BSD)
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 11:58:19 +00:00
bapt
1cf859bce0 Complete documenting the HISTORY of what remains of the 1BSD heritage
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 11:55:35 +00:00
bapt
a8f53ac426 Fix history: colrm(1) appeared in 1BSD not 3.0BSD
Add Author section

Obtained from:	OpenBSD (change by schwarze@)
2015-06-06 11:42:43 +00:00
bapt
1ae3a71a42 Fix some clang warnings:
Add missing headers
Add parenthesis when using the result of an assignment as a condition
2015-06-05 21:45:35 +00:00
bapt
d1d1b889d9 Fix typos 2015-06-05 21:35:20 +00:00
bapt
635343e5d6 Replace the gunzip(1) system by a minimalistic zlib based implementation.
This allows to not depend on gunzip(1) at bootstrap time, and is good enough to
wait for upstream real implementation using zlib.
2015-06-03 13:32:28 +00:00
dim
8c2b6d9370 Merge ^/head r283771 through r283870. 2015-06-01 06:54:21 +00:00
bapt
d9be45055a Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
This change among other things improve search capabilities over the manpages
allowing fine grain query.

A new build option WITHOUT_MANDOCDB has been added to keep the ancient version
of the database and the tools. The plan is to entirely remove this option before
11.0-RELEASE.

Differential Revision:	https://reviews.freebsd.org/D2603
2015-05-30 17:41:37 +00:00
dim
dce6917655 Merge ^/head r283596 through r283770. 2015-05-30 15:45:39 +00:00
dim
8f5245e1de Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r238337.
2015-05-30 15:39:49 +00:00
jhb
6a0a0389e1 Trim spurious colon. 2015-05-27 19:49:33 +00:00
jhb
4a4be98eae 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.

Differential Revision:	https://reviews.freebsd.org/D2277
Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc. (forward porting to HEAD/10)
2015-05-27 18:11:05 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
dchagin
f1806e4235 Teach kdump to understand both linux emulation.
Differential Revision:	https://reviews.freebsd.org/D1079
Reviewed by:	emaste
2015-05-24 16:22:03 +00:00
trasz
38f5a1dde7 Advertise ctlstat(8) a little better.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-05-22 11:59:37 +00:00
imp
3beb8f5711 Remove stray DEBUG_FLAGS=-g that snuck in with r184761. 2015-05-21 14:36:14 +00:00
bapt
2426717d0f Remove demandoc(1) from the build 2015-05-21 13:02:43 +00:00
bapt
e18aff02df Drop libmandoc and incorporate it into the main mandoc Makefile
This simplifies maintainance of mandoc(1).
Note that the same direction was taken on OpenBSD
2015-05-21 12:51:56 +00:00
bapt
0a58693d99 * fix roff terminology in .Nd
* remove .Xr to self
* add AUTHORS section

Submitted by:	schwarze at OpenBSD
2015-05-21 08:28:48 +00:00
bapt
7da418e1a9 add an include on sys/types.h because we do explicitly use size_t
remove unused stdbool.h

Suggested by:	schwarze at OpenBSD
2015-05-21 08:26:24 +00:00
bapt
5c514e6097 Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
Submitted by:	schwarze at OpenBSD
2015-05-21 08:23:45 +00:00
bapt
9bbc11a324 sort headers 2015-05-21 08:20:42 +00:00
allanjude
2ad178c529 Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name
Add a cross refrence to libprocstat in the procstat.1 man page

Differential Revision:	https://reviews.freebsd.org/D2578
Suggested by:	jmg
Reviewed by:	brueffer
Approved by:	wblock (mentor)
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
2015-05-21 03:32:44 +00:00
bapt
af288ae5ce Synchronize with OpenBSD
Obtained from:	OpenBSD
2015-05-18 22:40:12 +00:00
jmg
cbf08eb25f Don't do things we aren't allowed to do in a signal handler... Defer
the work to the main thread...  This fixes a possible crash if SIGINFO
is delivered at the wrong time...

This still leaves getrusage broken for some reason, but I believe that
is a kernel issue and cannot be fixed here...
2015-05-18 19:18:42 +00:00
loos
d9cd8beca4 Properly align the header and the data columns for netstat -r with and
without the -W flag.
2015-05-18 18:03:47 +00:00
loos
a416f5f996 Adjust the string format to match the actual number of arguments.
This fix a segmentation fault on ARM when netstat -r is used together with
-W.

This issue was introduced in r279122.
2015-05-17 15:12:55 +00:00
eadler
40b5caa259 ssh-copy-id: Add missing line continuation
PR:		194301
Reported by:	pkubaj@riseup.net
Patch by:	Ross Kilgariff <rosskilgariff@gmail.com>
2015-05-16 06:15:49 +00:00
bapt
10d3fc4445 Allow MANWIDTH to work with mandoc(1)
Reported by:	bdrewery
2015-05-15 15:56:28 +00:00
emaste
b8b309799a vtfontcvt: Allow 6 digits in verbose output
Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs.

Sponsored by:	The FreeBSD Foundation
2015-05-14 20:17:53 +00:00
emaste
01699072e4 Add ELF machine EM_IAMCU, 32-bit Intel MCU
It is e_machine 6, which was previously reserved for 486.
2015-05-14 18:29:05 +00:00
trasz
82bbee8b66 Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.

Differential Revision:	https://reviews.freebsd.org/D2407
Reviewed by:	emaste@, wblock@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-14 14:03:55 +00:00
fanf
2f34b1414e whois: add an option to query the PeeringDB 2015-05-14 11:37:36 +00:00
fanf
468f92a106 Update whois(1) synopsis. 2015-05-14 11:33:31 +00:00
fanf
15fa2921aa Bump whois(1) date.
(Thanks to bz@ for the reminder!)
2015-05-14 11:25:18 +00:00
fanf
961e7533e1 whois: alphabetize whois server list 2015-05-14 10:33:51 +00:00
fanf
18c4720eef whois: do not clobber command-line flags when tweaking O_NONBLOCK
This can make whois fail to follow referrals when it should.
The bug was introduced in r281959.
2015-05-14 10:33:33 +00:00
fanf
8fd803db87 whois: try whois.nic.TLD if TLD.whois-servers.net does not exist
Based on an idea from OpenBSD.
2015-05-14 10:33:01 +00:00
fanf
da775e97f7 whois: check WHOIS_SERVER as well as RA_SERVER environment variables
WHOIS_SERVER is used by Debian's whois client.
2015-05-14 10:32:35 +00:00
fanf
426168849a whois: code cleanup
Remove deprecated options.

Use pedantically correct types.
2015-05-14 10:32:05 +00:00
fanf
1e9ac2722e whois: special case certain query suffixes
This extends the existing support for -NORID handles
to include -NICAT, -ARIN, and -RIPE handles.

The suffix machinery is also used to work around a problem with
lack of referrals from the Nominet server for .uk: names under
.ac.uk need to be queried directly at JANET's whois server.
2015-05-14 10:31:37 +00:00
fanf
9a041aa829 Clean up whois manual.
Document the RA_SERVER environment variable.

Remove the obsolete -R option, and discourage people from trying
to use the Network Solutions server.

Describe the default behaviour in the DESCRIPTION section,
not buried in the options.
2015-05-14 10:30:37 +00:00
sjg
bc53a56c01 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
bapt
8bdd359838 For half and reverse line feeds, recognize both SUSv2-style escape-digit
and BSD-style escape-control-char sequences in the input stream.

Submitted by:	schwarze at OpenBSD
Discussed with:	schwarze at OpenBSD
Obtained from:	OpenBSD
2015-05-10 11:41:38 +00:00
bapt
326a669c75 Fix about ten integer overflows and underflows and a handful of logic
errors in line number handling.

Submitted by:	ingo at OpenBSD
Discussed with:	ingo at OpenBSD
Obtained from:	OpenBSD
2015-05-08 22:11:54 +00:00
bapt
22040d2a98 Reduce the size to 64 for the commands, 512 was way too large for the purpose
Noticed by:	julian
2015-05-07 21:30:29 +00:00
glebius
f9e194c452 Printing interface names:
o Restore historical behaviour of appending '*' if interface is down,
  and we have enough space to print it (usually we don't). [1]
o Do not truncate interface names when printing in encoded format.
o Report interface flags into encoded format.

PR:		199873 [1]
Sponsored by:	Nginx, Inc.
2015-05-06 16:43:44 +00:00
bapt
87da24f6db Enlarge the buffer for storing macros as some macros can be longer than 5 2015-05-05 09:54:47 +00:00
bapt
fcab16a373 Update the list of known roff commands (adding the mdoc package)
Obtained from:	NetBSD
2015-05-05 09:50:21 +00:00
bapt
dd5948751d Properly assign open and close brackets and checks memory
Obtained from:	NetBSD
2015-05-05 09:33:32 +00:00
bapt
8224924ecc Ensure we read existing values of the stk table
Obtained from:	NetBSD
2015-05-05 09:29:32 +00:00
bapt
a7c69e6c58 Use stdup(3) and check its return instead from homebrew version using strcpy(3)
and malloc(3)

Obtained from:	NetBSD
2015-05-05 09:26:32 +00:00
bapt
7517f3fab7 cosmetic fixes
Obtained from:	NetBSD
2015-05-05 09:24:29 +00:00
bapt
d9e656c586 Apply seom style(9) fixes from NetBSD
Obtained from:	NetBSD
2015-05-05 09:01:42 +00:00
bapt
41ce620053 Prevent useless use of strdup(3)
Obtained from:	NetBSD
2015-05-05 08:25:25 +00:00
bapt
de72406be4 Replace homebrewed NIL by NULL 2015-05-05 08:17:40 +00:00
bapt
c5d7e189d1 Use stdbool instead of homebrewed boolean 2015-05-05 08:15:10 +00:00
bapt
09ff591b15 Another function to ansify 2015-05-05 07:52:41 +00:00
bapt
1627eefffa Remove unused variables 2015-05-05 07:51:57 +00:00
bapt
0c925e0867 Explicitly use O_RDONLY instead of 0 2015-05-05 07:49:46 +00:00
bapt
642b9f5173 Use strlcpy(3) instead of strcpy(3) 2015-05-05 07:47:36 +00:00
bapt
a0da5a4be4 upper the warning level to 3 2015-05-05 07:42:40 +00:00
bapt
b04f76faa2 Another bit of ansification 2015-05-05 07:42:10 +00:00
bapt
ef4463e203 Ansify to allow to work on it later 2015-05-05 07:33:38 +00:00
bapt
e32b1e9092 Remove limitation on input lines by using getline(3) 2015-05-04 22:27:55 +00:00
bapt
3e499178cd Extend the list of known nroff/troff commands
Obtained from:	heirloom doctools
2015-05-04 22:18:58 +00:00
bapt
7169caff2e Take from heirloom's doctools version of checknr(1) some cosmetic fixes
This helps working on synchronising both tools
2015-05-04 22:05:12 +00:00
brooks
fe846feb04 Remove "capability mode sandbox enabled" messages.
These messages serve little purpose and break some consumers.

PR:		199855
Differential Revision:	https://reviews.freebsd.org/D2440
Reviewed by:	rwatson
Approved by:	pjd
MFC after:	1 week
Sponsored by:	DARPA, AFRL
2015-05-04 21:44:51 +00:00
bapt
5755f2166f Parse filename until first space then print the rest of the line after file
inclusion

This is the same behaviour of heirloom's soelim
2015-05-04 18:20:31 +00:00
bapt
d5ce924052 Capsicumize col(1) 2015-05-02 12:22:24 +00:00
bapt
14a360325d Actually push the right tests 2015-05-02 12:19:24 +00:00
bapt
b76c241652 Add regression test about reverse line feed to col(1) 2015-05-02 12:08:28 +00:00
bapt
0026949c41 Add regression tests for soelim(1) 2015-05-02 11:09:58 +00:00
bapt
aeb0d2a45d Improve compatibility groff's soelim
While here implement -C from GNU groff

Reported by:	delphij
2015-05-01 23:54:09 +00:00
delphij
ffdc60a5ea Correct - handling.
Reported by:	pkg-fallout
X-MFC-with:	r282318
2015-05-01 22:43:26 +00:00
bapt
bf4b130755 Replace groff's soelim by soeliminate(1) renamed soelim(1) 2015-05-01 20:08:25 +00:00
bapt
7cbe6caeb1 Remove bundled reallocarray(3) since it is now in libc 2015-05-01 18:32:54 +00:00
bapt
1b801f948f Use defines to improve clarity
MFC after:	2 weeks
2015-05-01 17:33:32 +00:00
bapt
0bd4fbdf68 col: fixing 25 year old bug
Makes col(1) respect POSIX again for escape sequences as decribed in its manpage
The bug was introduced in CSRG in 1990
This also reverts r280911

Differential Revision:	https://reviews.freebsd.org/D2424
Reviewed by:	jhb
MFC after:	2 weeks
2015-05-01 17:18:07 +00:00
emaste
7027d7c8c4 Actually add c++filt's Makefile
Missed in r282285

Pointy hat to:	emaste
2015-04-30 22:51:15 +00:00
emaste
8a9da57e83 Add ELF Tool Chain's c++filt to the build
Differential Revision:	https://reviews.freebsd.org/D2408
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
2015-04-30 21:30:33 +00:00
trasz
0f1faab39c Remove spurious period.
MFC after:	1 month
Sponsored by:	International OCD Foun^W^W^WThe FreeBSD Foundation
2015-04-29 17:01:28 +00:00
trasz
4bc6bb96ac Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:41:49 +00:00
rene
e0e7dcf8e6 The Dutch queen abdicated two years ago, the national holiday associated with
her birthday is now associated with the birthday of her son.
2015-04-27 17:04:27 +00:00
oshogbo
d32baecb23 Add myself (oshogbo) to calendar.freebsd and committers-src.dot.
Approved by:	pjd (mentor)
2015-04-27 16:45:16 +00:00
jilles
9038472054 hexdump: Don't use uninitialized struct stat. 2015-04-26 21:34:55 +00:00
sobomax
09e002d8cf o Properly init prevtime, so that we don't print bogus value in the
first entry reported by the relative mode (-R).

o Properly print negative offsets, which I guess may happen if
records get re-ordered somehow, possibly due to the locking. Right
now we report huge bogus diff (i.e. 2 seconds or so).
2015-04-25 04:58:08 +00:00
delphij
f07d7ffd84 Try alternate addresses more agressively.
Attempt to connect to alternate addresses if the connect doesn't
succeed in 180ms, and cut wait time between connection attempts
in half for each additional, if no connection was established.

Take the first connection to succeed and close the others.

This makes whois more responsive when e.g. IPv6 service took long
time or fail to respond.

PR:		158125
Submitted by:	Mark Andrews <marka isc org> (with changes from me)
MFC after:	2 weeks
2015-04-25 00:51:44 +00:00
trasz
f9718e52b2 Make nfsstat(1) build with WARNS=6.
Sponsored by:	The FreeBSD Foundation
2015-04-24 07:57:59 +00:00
trasz
c8f92b825a Remove oldnfs support from nfsstat(1).
Reviewed by:	rmacklem@ (earlier version)
Sponsored by:	The FreeBSD Foundation
2015-04-23 14:36:01 +00:00
jhb
e4683250d1 Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
sjg
af117d16cb Merge bmake-20150418
PR: 199486
2015-04-21 04:40:38 +00:00
pfg
e13e816432 patch(1): small include changes.
Mostly to match OpenBSD, no functional change.

Obtained from:	OpenBSD
2015-04-20 22:15:18 +00:00
eadler
1f247fe702 find.1: Add missing whitespace:
Obtained from:	Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc)
2015-04-20 02:23:00 +00:00
eadler
1cd30e69b5 rpcgen: fix use use of strcmp
strcmp only guarantee that it will return at least 1 if the string B
	is greater than that of string A.
2015-04-19 04:53:28 +00:00
eadler
a06fddc3fc calendar: remove useless check
lineline checked for 0 in the while loop condition.  There is no need to
	check for it additionally in the body.

CID:	1288959
MFC After:	1 week
2015-04-19 04:27:50 +00:00
trasz
7ba042082b Remove some oldnfs remnants.
Differential Revision:	https://reviews.freebsd.org/D2287
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-18 16:08:06 +00:00
delphij
76763465e1 r281540 was upstreamed as NetBSD r1.108 of gzip.c, note it as merged. 2015-04-16 22:30:57 +00:00
allanjude
3530f6e66c Fix libxo output from uptime command
the libxo output for uptime returned multiple 'uptime' keys, one each for number of days, hours, and minutes of uptime.
This is invalid JSON.
This patch makes the output the raw number of seconds, as well as adding keys for the individual unit values
A string of the original output from the plain-text uptime command is also added

Differential Revision:	https://reviews.freebsd.org/D2063
Reviewed by:	jmg
Approved by:	marcel
Sponsored by:	ScaleEngine Inc.
2015-04-16 22:09:37 +00:00
bdrewery
7a3f5ce86a Fix SIGINFO race causing final results to be lost to stderr.
If a SIGINFO comes in after the file is read then the 'siginfo' flag is set to
1 and the next call to show_cnt() (at exit) would print the data to stderr
rather than the expected stdout.

This was found with spamming Poudriere with SIGINFO which caused a 'wc -l'
execution to return no data rather than an expected number.

MFC after:	2 weeks
2015-04-16 21:44:35 +00:00
bdrewery
bcb387d747 Remove extra flags from r250462.
MFC after:	1 week
2015-04-16 02:24:40 +00:00
tijl
b0813ee288 Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html

Adjust all code that calls iconv.

PR:		199099
Exp-run by:	antoine
MFC after:	2 weeks
2015-04-15 09:09:20 +00:00
delphij
e54d940929 When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file.  In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack.  Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.

Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.

Reported by:	Coverity
CID:		1264915
X-MFC-with:	281500
MFC after:	13 days
2015-04-15 00:07:21 +00:00
andrew
2fb2ff8b6b Disable truss, gprof, and lint on arm64, they don't build.
Sponsored by:	The FreeBSD Foundation
2015-04-14 10:15:58 +00:00
eadler
3cc5d845f2 ipcs: fix builds that use gcc
gcc gets annoyed by duplicate declarations

Reported by:	sbruno
Reviewed by:	sbruno
2015-04-14 04:52:52 +00:00
eadler
fef0a473a6 ipcs: fix warnings (WARNS=1 -> WARNS=6)
- fix shadow warnings
	- change type from off_t to size_t which is more correct and avoids
	  signed/unsigned compare
	- use new initializer format to avoid "missing values" warning

Reviewed by:	jhb
2015-04-13 19:58:11 +00:00
delphij
25401a0f56 Sync with NetBSD:
- Mention xz(1) in gzip(1).
 - Strip away path from header name when decompressing.

MFC after:	2 weeks
2015-04-13 19:46:30 +00:00
trasz
d5617cbc74 Add libxo(3) support to iscsictl(8).
PR:		198396
Submitted by:	Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-12 09:36:50 +00:00
bapt
c7f08411e0 Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
2015-04-10 17:50:28 +00:00
bapt
b0266e10a7 Remove uneeded link to libkiconv 2015-04-09 21:30:11 +00:00
bapt
a609eb65b0 Convert mt(1) and libmt to LIBADD
While here fix missing link to libbsdxml for libmt
Fix overlinking in mt(1)
Make add an indirect libmt dependency on bsdxml to allow static linking if
needed
2015-04-09 21:26:38 +00:00
bapt
7d6898c7b9 Remove uneeded sbuf header 2015-04-09 21:23:27 +00:00
bapt
48e9406f51 iscsictl(8) does not actually needs to be linked to libcam nor libutil 2015-04-09 21:14:40 +00:00
emaste
6c122fcc28 Avoid escaping EOL for line continuation
Reported by:	kib
2015-04-09 15:08:39 +00:00
emaste
c4c8403c3f ar: Disallow directory traversal
Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT
as in bsdtar to prevent extraction of archive entries whose pathnames
contain .. or whose target directory would be altered by a symlink.
Also disallow absolute pathnames.

We don't currently provide an option to disable this behaviour (as
bsdtar's -P does). It is unlikely to be a problem in practice for ar(1),
but the -P option is not currently used and available if we want to
consider it for this purpose.

Differential Revision:	https://reviews.freebsd.org/D1524
Reported by:	Alexander Cherepanov <cherepan@mccme.ru>
Approved by:	delphij
Obtained from:	ELF tool chain ar, Ticket #474
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-04-09 13:45:17 +00:00
jhb
148355cbb6 Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h>
and export them to userland.
- Define __HAVE_REG32 on platforms that define a reg32 structure and check
  for this in <sys/procfs.h> to control when to export prstatus32, etc.
- Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures.
  libbfd looks for these types, and having them fixes 'gcore' in gdb of a
  32-bit process on a 64-bit platform.
- Use the structure definitions from <sys/procfs.h> in gcore's elf32 core
  dump code instead of duplicating the definitions.

Differential Revision:	https://reviews.freebsd.org/D2142
Reviewed by:	kib, nathanw (powerpc bits)
MFC after:	1 week
2015-04-08 16:30:45 +00:00
pfg
e0a51429a4 patch: Bring small updates from OpenBSD
Prevent null pointer dereference on empty input files when diff requires
a specific version.

Fix division by zero for files with long lines (> 1024) in Plan B mode
by supporting arbitrarily long lines.

Obtained from:	OpenBSD (CVS Rev 1.41, 1.42)
MFC after:	1 week
2015-04-07 18:06:46 +00:00
takawata
411a5fdbb3 Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKED
This will fix build.
2015-04-07 16:48:23 +00:00
allanjude
739c57d8c2 Fix missing AUTHOR section for jot(1), rs(1), and lam(1)
PR:		196786
Differential Revision:	https://reviews.freebsd.org/D2115
Submitted by:	John A. Kunze (Author)
Approved by:	wblock (mentor)
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
2015-04-07 15:56:08 +00:00
tuexen
05cd62f67a The code says "or", not "either or". So fix the documentation.
MFC after: 1 week
2015-04-07 14:33:03 +00:00
glebius
70540f5f7b Like it was already done for 'netstat -i', drop the kvm(3) support
in 'netstat -r'.

The netstat/route.c was the last abuser of struct ifnet and struct
rtentry in the tree. With this change if_var.h can become kernel
only include, _WANT_RTENTRY can go away and projects/ifnet and
projects/routing can go forward.

Differential Revision:	https://reviews.freebsd.org/D2242
Reviewed by:		melifaro, gnn
Sponsored by:		Nginx, Inc.
Sponsored by:		Netflix
2015-04-07 05:50:45 +00:00
pfg
11828bfdd2 Remove custom getdelim(3) and fix a small memory leak.
Originally from Andre Smagin.

Obtained from:	OpenBSD
MFC after:	1 week
2015-04-07 01:17:49 +00:00
pfg
afe0cfa5d0 sort(1): Cleanups and a small memory leak.
Remove useless check for leading blanks in the month name.  The
code didn't adjust len after stripping blanks so even if a month
*did* start with a blank we'd end up copying garbage at the end.
Also convert a malloc + memcpy to strdup and fix a memory leak in
the wide char version if mbstowcs() fails.
Originally from Andre Smagin.

Obtained from:  OpenBSD (CVS rev. 1.2, 1.3)
MFC after:	1 week
2015-04-07 01:17:29 +00:00
markj
67e12a6d15 lockf(1): add a reference to lockf(3).
Submitted by:	Conrad Meyer
MFC after:	1 week
2015-04-06 22:53:23 +00:00
glebius
8ea08edd44 o Make net.inet6.ip6.mif6table return special API structure, that doesn't
contain kernel pointers, and instead has interface index.
  Bump __FreeBSD_version for that change.
o Now, netstat/mroute6.c no longer needs to kvm_read(3) struct ifnet, and
  no longer needs to include if_var.h

Note that this change is far from being a complete move of IPv6 multicast
routing to a proper API. Other structures are still dumped into their
sysctls as is, requiring userland application to #define _KERNEL when
including ip6_mroute.h and then call kvm_read(3) to gather all bits and
pieces. But fixing this is out of scope of the opaque ifnet project.

Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2015-04-06 22:12:18 +00:00
glebius
78d51c7b15 Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
pfg
23c3b77477 sort: style knits / cleanups.
Minor cleanups that got accidentally reverted.

Obtained from:	OpenBSD
2015-04-06 03:02:20 +00:00
pfg
4a1d849efc Revert (partial) r281123, r281125:
sort: style knits / cleanups.

Our style guide(9) specifies that in absence of local variables
an empty line must be inserted.

Pointed out by:	eadler
2015-04-06 02:35:55 +00:00
pfg
cf28b0945a sort: style knits / cleanups.
Obtained from:	OpenBSD
2015-04-05 23:06:42 +00:00
pfg
b99203e9f2 sort: Fix a comment.
Obtained from:	OpenBSD
2015-04-05 22:34:03 +00:00
pfg
ed77a0cd5f sort: Cleanup small issues with spaces.
Obtained from:	OpenBSD
2015-04-05 22:22:43 +00:00
dim
c660843b7a Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is
defined.  These help with processing coverage and profile data.
2015-04-03 19:43:39 +00:00
trasz
c1c36af15f Add IPv6 example to iscsi.conf(5) and tweak ordering.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-02 11:52:34 +00:00
trasz
9be4babe98 Rewrite iscsi.conf(5) to better match iscsictl(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-02 11:18:43 +00:00
kevlo
a06b60def5 Remove bogus cast. 2015-03-31 15:03:58 +00:00
emaste
bcc7f33561 Switch to ELF toolchain readelf(1)
ELF toolchain readelf lacked some functionality at the time other tools
(like size, strip, nm, etc.) were switched over to the ELF toolchain
versions. That has been addressed as of the last update, so we can add
it to the list.

PR:		198950 [exp-run]
Reviewed by:	bapt, imp, rpaulo
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2156
2015-03-30 17:38:25 +00:00
kp
ca119dca50 Clarify the ministat default width
The man page states that:
'-w width    Width of ASCII-art plot in characters, default is 74.'

This is not entirely correct. The mini-help is more accurate:
'-w : width of graph/test output (default 74 or terminal width)'

In other words: the man page fails to explain that ministat will default
to the terminal width, not 74. It will only fall back to 74 if stdout is
not a TTY.

Submitted by:	Ben Hutchings <ben@decadent.org.uk>
Approved by:	philip (mentor)
2015-03-26 17:13:11 +00:00
kevlo
50258b1c00 Print size_t's with %zu rather than "%zd.
Reviewed by:	bde
2015-03-26 09:13:16 +00:00
jkim
3cb01b490f Remove defunct SSLv2 support from fetch(1) and fetch(3). 2015-03-25 18:56:36 +00:00
pfg
6b0fe69346 xlint: update.
Bring some important updates from NetBSD up to about 2008/04/25.
The main feature is initial support for C99.

This is a very basic update to make it easier to merge new
compiler attirbutes but more updates are likely to follow.

Obtained from:	NetBSD
MFC after:	2 weeks
2015-03-23 18:45:29 +00:00
wblock
41e81c759a Describe the behavior when both -f and a message are given. Pointed out by
Raphael Abreu <raphael.lorenzeto@gmail.com> on freebsd-doc.

MFC after:	1 week
2015-03-22 01:25:57 +00:00
pfg
f0d9946f04 bsdgrep: fix regression in the -f option since r268799
Caused by an incomplete merge from NetBSD.

PR:		198725
MFC after:	3 days
2015-03-21 00:21:30 +00:00
ken
dbd87e5d3d Improve the mt(1) rblim display.
The granularity reported by READ BLOCK LIMITS is an exponent, not a
byte value.  So a granularity of 0 means 2^0, or 1 byte.  A
granularity of 1 means 2^1, or 2 bytes.

Print out the individual block limits on separate lines to improve
readability and avoid exceeding 80 columns.

usr.bin/mt/mt.c:
	Fix and improve the 'mt rblim' output.  Add a MT_PLURAL()
	macro so we can print "byte" or "bytes" as appropriate.

Sponsored by:	Spectra Logic
MFC after:	4 days
2015-03-18 20:54:54 +00:00
ken
1cc0a333e9 Fix a couple of problems in the sa(4) media type reports.
The only drives I have discovered so far that support medium type
reports are newer HP LTO (LTO-5 and LTO-6) drives.  IBM drives
only support the density reports.

sys/cam/scsi/scsi_sa.h:
	The number of possible density codes in the medium type
	report is 9, not 8.  This caused problems parsing all of
	the medium type report after this point in the structure.

usr.bin/mt/mt.c:
	Run the density codes returned in the medium type report
	through denstostring(), just like the primary and secondary
	density codes in the density report.  This will print the
	density code in hex, and give a text description if it
	is available.

Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives
and Bacula and discovering these problems.

Tested by:	Rudolf Cejka <cejkar at fit.vutbr.cz>
Sponsored by:	Spectra Logic
MFC after:	4 days
2015-03-18 20:52:34 +00:00
andrew
508f9c2bba Allowus to exclude a.out support from ldd and use it with arm64 as it won't
support the a.out format.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2015-03-18 13:59:04 +00:00
emaste
957d1c1c99 xlint: add arm64 #define
Submitted by:	andrew@
Sponsored by:	The FreeBSD Foundation
2015-03-18 13:07:19 +00:00
emaste
6e4dc74403 Add arm64 xlint support.
Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
2015-03-17 19:16:51 +00:00
bapt
829badf1cd Remove bad and useless LINKS 2015-03-15 23:31:20 +00:00
jilles
08ae96abfd unzip: Don't subvert vfs.timestamp_precision when setting atime to now.
Also, preserve nanoseconds from libarchive, even though the zip file format
does not currently support nanoseconds in timestamps.
2015-03-15 21:29:20 +00:00
dim
f57aa367a2 Regenerated llvm/clang manpages. 2015-03-14 19:22:15 +00:00
dim
49820c9622 Merge ^/head r279893 through r279984. 2015-03-14 13:08:00 +00:00
imp
0bed81517c TARGET_* shouldn't be used here. Use MACHINE_* instead. 2015-03-12 08:32:24 +00:00
imp
d6f0fe764e These local variables are unused. gc them. 2015-03-12 08:32:22 +00:00