Commit Graph

3061 Commits

Author SHA1 Message Date
christos
cf2d7e97b8 New arp code needs RTF_LLDATA for DELETE to work!
XXX: pullup-8
2018-07-08 21:01:21 +00:00
triaxx
7d3291fe74 Fix an inconsistency that showed /var/db/duid in the man page while the
binary opened /var/db/dhcpcd/duid.
2018-07-05 05:41:17 +00:00
maya
97fc8f3ce3 Correctly specify that iasl needs to be case insensitive.
Fixes PR bin/53405. thanks to martin.
2018-06-28 07:56:22 +00:00
maya
746c9ac266 Remove unused code. No functional change intended.
- We don't need to define __NetBSD__, C compilers do this for us.
- Defines which don't appear anywhere in src
- Don't need libpthread/librt
2018-06-27 16:13:43 +00:00
kamil
eb8a7705cd Avoid UB in tmux/window_copy_add_formats()
Do not perform NULL pointer arithmetics.

Reported with MKSANITIZER/UBSan.

The patch proposed by upstream https://github.com/tmux/tmux/issues/1382
2018-06-25 18:41:25 +00:00
kamil
54b8bd3463 Include <stddef.h> for offsetof(3) 2018-06-25 18:36:36 +00:00
kamil
17b10cd3f4 Specify SANITIZER_RENAME_SYMBOL in nvi
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:00:34 +00:00
kamil
626dd188a2 Avoid unportable offsetof(3) calculation in nvi in log1.c
Detected with MKSANITIZER/UBSan.
2018-06-25 17:42:34 +00:00
roy
8a7c7b0681 Sync 2018-06-21 11:58:23 +00:00
roy
8798a27054 Import dhcpcd-7.0.6 with the following changes:
*  fixed compile issues with prior release
  *  fixed carrier loss not being detected for IPv4
  *  UUID based DUID is used where available and no prior DUID exists
2018-06-21 11:55:19 +00:00
kamil
b3019d4b3d Correct previous change to CHAR_T_OFFSET
The intended operation is offsetof(), not alignof().

Noted by <christos>
2018-06-16 21:00:12 +00:00
kamil
4e2759a682 Do not cause Undefined Behavior in vi(1)
Replace unportable manual calculation of alignof() that causes UB, with
a GCC extension __alignof__.

This fixes a problem reported by UBSan with the MKSANITIZER distribution.
2018-06-16 18:54:52 +00:00
wiz
20caeb0eac Fix Dd argument. Remove unnecessary whitespace. 2018-06-15 23:15:56 +00:00
christos
fdf2ea1385 Add -n (don't send mail if command exited normally) option. From OpenBSD via
Job Snidjers.
2018-06-14 22:04:28 +00:00
christos
4911152229 Replace with the OpenBSD man page. It removes some historical comparisons
that are not very useful (and trully if any they belong to a separate section
instead of being interspersed in the document), and organizes and formats
the information better.
2018-06-14 22:02:57 +00:00
christos
2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
kamil
3aa96d1801 Don't pass -z defs to libc++ with MKSANITIZER=yes
Sanitizers are conflicting with this option:

  When linking shared libraries, the AddressSanitizer run-time is not
  linked, so -Wl,-z,defs may cause link errors (t use it with
  AddressSanitizer).

https://clang.llvm.org/docs/AddressSanitizer.html

  When linking shared libraries, the MemorySanitizer run-time is not
  linked, so -Wl,-z,defs may cause link errors (t use it with
  MemorySanitizer).

https://clang.llvm.org/docs/MemorySanitizer.html

Solution suggested by <christos>
Root cause of breaking libc++ investigated by <Yang Zheng>
2018-06-06 12:02:43 +00:00
snj
3120750dcb rats in my attic, mice in my top. i've had enough of these damn rodents. 2018-06-06 02:12:47 +00:00
roy
03a87bcca2 Sync 2018-06-04 16:45:52 +00:00
roy
90122e541e Sync 2018-06-04 09:56:16 +00:00
roy
53aec9c10e Import dhcpcd-7.0.5a.
Only change is to fix builds without INET6.
2018-06-04 09:55:13 +00:00
rin
65b076fb4d Make sure that every wide char occupies at least one display width:
- Replace non-printable multibyte char with ?-symbol.
  - Put space before non-spacing char.

Fix problems reported in PR bin/53164 and
PR bin/53323, that are because we did not take into account non-printable
multibyte char of wctob(wc) == EOF && wcwidth(wc) == -1.
2018-06-03 08:08:36 +00:00
eadler
94ea5fdc4c top(1): revert 1.11
This change breaks the expectations of users that would like a coredump
of top(1). Other similar applications such as vmstat(1) don't do this.
Since the change was just a courtesy, revert.
2018-06-03 05:29:27 +00:00
eadler
6aed99669b top(1): chdir to / at init
This allows us to unmount whatever directory we happen to be in when we
started top(1).

ok phone
2018-06-02 22:30:19 +00:00
roy
0450c156e9 Sync 2018-06-02 09:44:27 +00:00
roy
32efa79ab1 Import dhcpcd-7.0.5 with the following changes:
*  dhcp: Clarified some checksumming code, style and commentary
     (thanks to Maxime Villard)
  *  dhcp6: IAID is now unique per IA type rather than global
  *  ip6: if an IA callback causes a fork, exit earlier
2018-06-02 09:42:48 +00:00
kamil
ea3d16d0e0 Fix read of unitialized array elements in top(1)
The cp_old array is allocated with malloc(3) and its pointer is passed to
percentages64().

In this function there happens a calculation of total_change, which value
depends on the value inside the unitialized cp_old[] array.

==26662==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6
#1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6
#2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5
#3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2
#4 0x21cad1 in ___start (/usr/bin/top+0x1cad1)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64
Exiting

Fix this issue by changling malloc(3) with calloc(3).

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>
2018-05-31 10:14:21 +00:00
kamil
3ff7937744 Fix unitialized signal mask passed to sigaction(2) in top(1)
Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>
2018-05-31 09:20:05 +00:00
mrg
5d873ca56c make 'clean' and/or 'cleandir' actually clean all the things. 2018-05-31 09:08:25 +00:00
christos
268058c040 One more possible star. 2018-05-24 19:21:01 +00:00
christos
cf5e80d451 handle '*' entries in rules. 2018-05-24 19:19:37 +00:00
christos
9a9aea2376 refresh the diffs to the latest portable 2018-05-23 16:03:07 +00:00
christos
a04d8a2863 regen 2018-05-19 18:14:51 +00:00
christos
c61c623903 add more casts (needed for c++)
XXX: A better solution would be to use C++ casts.
2018-05-19 18:14:36 +00:00
christos
a18d7413b9 regen 2018-05-19 01:53:24 +00:00
christos
d6b914290e provide bison compatibility for YYLLOC_DEFAULT 2018-05-19 01:52:48 +00:00
christos
b05df594cf Add awk line 2018-05-19 01:51:05 +00:00
joerg
da40fa177a Cast enum explicitly to different type. 2018-05-16 13:54:03 +00:00
christos
bad1191a12 Fix the tools build. 2018-05-03 01:32:17 +00:00
roy
bdaa820626 Sync 2018-05-02 22:08:45 +00:00
roy
d1cb50ca95 Import dhcpcd-7.0.4 with the following changes:
* Routing: Fix case when cloning route changes but needs to be replaced
 * DHCP6: Transpose DHCP userclass option into DHCP6
 * DHCP6: Fix sending custom vendor class option
 * Auth: Allow zero value replay detection data
 * Auth: Allow different tokens for send and receive
 * ND6: Warn if router lifetime is set to zero
 * DHCP6: Softwire Address and Port-Mapped Clients, RFC7598
2018-05-02 22:06:41 +00:00
martin
0cfcd47b57 Use crypto code from openssl. Fixes PR bin/53250, suggested by Christos. 2018-05-02 14:43:59 +00:00
christos
bf7113376a Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
2018-05-01 19:59:42 +00:00
jmcneill
bf77b4887b Install ARM ACLE and NEON intrinsics headers on aarch64. 2018-04-29 18:29:29 +00:00
christos
fef18fab8e fix the build: tcpiphdr is now defined in tcp_var.h and tcp_var.h needs
tcp_timer.h. This struct move is more trouble than its worth. It breaks
header compatibility with other BSD's and can't be really removed because
it is an installed header that will break other 3rd party software. I
suggest that it gets reverted!
2018-04-29 15:59:07 +00:00
christos
230aa26942 we don't have mtab or rmtab 2018-04-21 18:34:08 +00:00
christos
f6f2143a7d __noreturn__ does in the header. 2018-04-18 01:18:16 +00:00
christos
0d11799cf0 add __noreturn__ attribute to file_err{,x} 2018-04-18 01:17:42 +00:00
jakllsch
cbdb990355 sprinkle #ifdef __dead \n __dead \n #endif for clang 2018-04-17 12:34:04 +00:00
christos
5efe63de58 merge conflicts for file-5.33 2018-04-15 19:45:31 +00:00