Commit Graph

13704 Commits

Author SHA1 Message Date
christos 4685e01b74 add WITHOUT_GZIP for the tools build. 2018-08-12 09:03:21 +00:00
christos 8e22f7e23d fix libraries 2018-08-12 08:00:32 +00:00
christos 4f89880b45 remove stray paren 2018-08-12 07:59:14 +00:00
christos dfe5f25515 add WITHOUT_BZ2 for tools build. 2018-08-12 07:53:19 +00:00
christos ab4aefc826 use setvbuf if available; it is more portable. 2018-08-11 19:44:19 +00:00
christos 647d6f88ee don't build NLS if we don't need to 2018-08-11 19:43:54 +00:00
christos ce1225c115 remove dup includes (already in grep.h) 2018-08-11 16:03:37 +00:00
kre 9f2b1d9e76 Avoid an infinite loop caused by a line accidentally dropped
in 1.22 (almost 30 months ago!)

[ Discovered by rhialto@ ]
2018-07-30 22:58:09 +00:00
wiz e694dd94ec Use An -nosplit. Use Mt. Fix some mandoc lint. 2018-07-28 08:03:41 +00:00
wiz 8c602bad3c Sync usage with man page. 2018-07-26 08:57:32 +00:00
wiz 4426bfba8a Add -S to SYNOPSIS. Sort option descriptions. 2018-07-26 08:57:26 +00:00
kamil 783e210b8b Introduce a new option -S in crunchgen(1)
The -S argument enables sanitization with a sanitizer in libc.
2018-07-25 23:41:28 +00:00
kre 47ea218fd1 NFC: More KNF (remove () around returned constants). 2018-07-25 15:35:27 +00:00
kre 5755a4ea22 NFC: whitespace & KNF. 2018-07-25 14:41:52 +00:00
christos 706eabb7af Provide MacOS/X compatible flags (where possible)
Propagate errno
2018-07-25 03:45:34 +00:00
kre 2fb3e9fabf Add the new formats to the list of format cracters (oops...) 2018-07-24 20:58:39 +00:00
kre ddc0976a72 Add support for F a and A formats (which go with the eEfgG formats
already supported.)
2018-07-24 20:49:19 +00:00
kre 520d24e3eb Correct a typo (off by one (key)) ...
There is no 'w' format, but there is an 'e'
2018-07-24 19:49:33 +00:00
wiz 3926ef35d5 Fix typo. Comment out SEE ALSO since it only refers nonexistent man pages.
Reduce history to NetBSD until we know more details about other OSes.
Use An. Fix Dt argument.
2018-07-24 19:08:22 +00:00
christos 0d2d986001 Tiny base64 encoder/decoder command patterned after the linux and the macosx
ones with the same name,.
2018-07-24 15:26:16 +00:00
snj d55a68a4f5 add netbsd 8.0, fix whitespace 2018-07-21 18:50:22 +00:00
joerg e077d7edbf Ignore malformed directory entries as created by Dropbox ("/"). 2018-07-19 18:04:25 +00:00
maxv 5ae6235d0e Remove tpfmt(1). Its code was merged into tprof(8). 2018-07-13 11:14:14 +00:00
mrg 1b11df59cf don't try to decend into remove 'pmc' subdir. 2018-07-13 11:13:10 +00:00
maxv 696d8f99b2 Remove the usr.bin/pmc tool. People should use tprof instead. 2018-07-13 09:15:55 +00:00
christos 3a280067df Fix previous: cached_stats() returning < 0 means that the file is not found,
not that it was found in the cache, and centralize reporting.
2018-07-12 18:03:31 +00:00
reinoud 38c2b03323 Remove duplicate code in make(1)'s dir.c.
When the cached_stats() code was added, some old logic stayed around that
implements the cached_stats() too.
2018-07-12 17:46:37 +00:00
msaitoh 24a510d5b0 Print iqdrops, too. This change also fixes a bug that Odrops prints
iqdrops when kvm read failed.
2018-07-11 07:46:20 +00:00
christos f4654072f5 recognize noinline attribute 2018-07-08 17:48:42 +00:00
kre 4bcba09122 Avoid printing error messages twice when an invalid
escape sequence (\ sequence) is present in an arg to a %b
conversion.
2018-07-03 01:56:39 +00:00
kre a78ff1f90a From leot@ on tech-userlevel:
Avoid running off into oblivion when a format string,
or arg to a %b conversion ends in an unescaped backslash.

Patch from Leo slightly modified by me.
2018-07-03 01:54:42 +00:00
christos 9f321dce94 Add our syslog format. 2018-06-29 20:18:36 +00:00
christos 8910c94cf4 add missing args for 123 2018-06-29 20:18:05 +00:00
msaitoh 204f26c6d9 Print BPF direction correctly. 2018-06-26 10:00:25 +00:00
msaitoh 90fcd8faa4 Fix a bug that BPF_D_OUT isn't printed correctly. 2018-06-26 09:50:42 +00:00
msaitoh 3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
kamil 2ca8c8d72f Specify SANITIZER_RENAME_SYMBOL in chpass
Rename local versions of getpwent getpwnam getpwnam_r getpwuid getpwuid_r
(all of the symbols are namespaced) in order to remove symbol clash with
libc.

This program uses code directly from libc.
2018-06-25 18:05:25 +00:00
christos fd98358317 Don't require any arguments as the usage indicates; simplifies the code
and the documentation: now "jot" works like "jot -" used to (and continues
to). From Ingo Schwarze
2018-06-25 14:29:17 +00:00
kamil b6ed70bb6e Add new option -s to crunchgen(1) -- enable sanitization
As of today typical sanitizers require dynamic executables, while
crunchgen(1) programs are produced with static properties.

Lack of specified -s will:
 - generate a Makefile file with NOSANITIZER=
 - build programs that are dependencies with NOSANITIZER=

In future there is an option to handle sanitization in statically linked
programs.

An idea with -s LGTM by <christos>
2018-06-21 10:55:54 +00:00
kamil f4a6ea5271 Disable SANITIZER for ldd(1)
These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
ELF dynamic loader that is not being sanitized and its symbols are
installed into sanitized programs (in particular __tls_get_addr()).

Additionally libldd is used in rescue that is not expected to be sanitized
as of today.
2018-06-21 10:41:45 +00:00
christos a2ee17b347 Keep things portable (requested by joerg) by not depending on reallocarr
and instead doing the overflow check ourselves.
2018-06-18 18:33:31 +00:00
christos 759529ae76 PR/53368: Thomas Barabosch: Potential integer overflow in usr.bin/patch/inp.c 2018-06-16 00:40:14 +00:00
mrg 2951cf94c8 move 'utsname' to the main() function scope, so that the reference to
it outside the block remains valid.

should fix an asan reported issue.
2018-06-15 20:16:35 +00:00
christos 88efda49f6 remove extra quotes. 2018-06-12 15:41:35 +00:00
christos bf830a4102 - instead of hard-coding the include paths in mkioctls, pass them in
from the Makefile so that they are consistent.
- do more sed so that destination paths are not hard-coded inside #include
  statements.
2018-06-12 15:40:39 +00:00
kamil 2760f15b81 Correct Undefined Behavior in gzip(1)
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# progress -zf ./games.tgz  tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of 251 by 24 places cannot be represented in type 'int'
100% |****************************************************************************************************************| 44500 KiB  119.69 MiB/s    00:00 ETA


Refactor the following code into something that is more clear
and fix signed integer shift, by casting all buf[] elements to
(unsigned int):

unsigned char buf[8];
uint32_t usize;
[...]
else {
    usize = buf[4] | buf[5] << 8 |
            buf[6] << 16 | buf[7] << 24;
[...]

New version:

    usize = buf[4];
    usize |= (unsigned int)buf[5] << 8;
    usize |= (unsigned int)buf[6] << 16;
    usize |= (unsigned int)buf[7] << 24;

Only the "<< 24" part needs explicit cast, but for consistency make the
integer promotion explicit and clear to a code reader.

Sponsored by <The NetBSD Foundation>
2018-06-12 00:42:17 +00:00
kamil 1c426e1841 Restore the MKGROFF=bo MKCXX=yes build
Mark the documentation in dc(1), gprof(1), rogue(6) and fsck_ffs(8) with
the .roff flag in SUBDIR.

Sponsored by <The NetBSD Foundation>
2018-06-11 14:18:16 +00:00
christos 2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
nat 911089b591 Update fstat for audio(4) and pad(4) devices.
XXX - pullup 8.

Ok christos@.
2018-06-04 01:42:49 +00:00
kamil 6d98e3fd29 ktruss: Remove symbol clash with libc
Rename local function wprintf() to xwprintf().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>
2018-06-03 13:41:30 +00:00