summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r285844: ar: add -U (unique) option to disable -D (deterministic) modeemaste2015-08-312-7/+34
| | | | | | | | | 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
* MFC r286344: find: Fix segfault with very long path in -exec/-ok ... {} \;.jilles2015-08-282-15/+25
| | | | | | | | | | | | | 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
* MFC r281800 (pfg):delphij2015-08-273-45/+40
| | | | | | | | | | | 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@.
* MFC r286660, r286419, r286417, r286395, r286215, r284883marcel2015-08-258-46/+151
| | | | | | | | | - Add the ntfs alias - Fix the dynamic VHD format to work with qemu - Update manpage MFH: Differential Revision:
* MFC r285742:ed2015-08-201-0/+8
| | | | | | | | | | | | | | 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 r285842: truss: follow pdfork()ed descendents with -femaste2015-08-148-0/+8
|
* MFC r286615:pfg2015-08-141-2/+2
| | | | Clean up some externally visible "more then" occurences
* Fix patch(1) shell injection vulnerability via ed(1). [SA-15:18]delphij2015-08-052-4/+16
| | | | Fix routed remote denial of service vulnerability. [SA-15:19]
* MFC r286102:pfg2015-08-041-2/+2
| | | | | | | | | | | 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
* MFC r285782:markj2015-07-311-6/+18
| | | | | | Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *). PR: 201700
* Fix patch(1) shell injection vulnerability. [SA-15:14]delphij2015-07-282-41/+65
| | | | | | Fix resource exhaustion in TCP reassembly. [SA-15:15] Fix OpenSSH multiple vulnerabilities. [SA-15:16]
* MFC r285248: lldb: use .PATH to find man page instead of symlinking itemaste2015-07-281-2/+2
|
* MFC r284636:hrs2015-07-232-46/+64
| | | | | | | | | | - 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)
* MFC r285253 (hrs):gjb2015-07-201-31/+17
| | | | | | | | | | | - 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
* MFC: r285457brueffer2015-07-201-10/+1
| | | | | | | | | 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)
* MFC: r285028brueffer2015-07-131-1/+1
| | | | | | | | Add the year to the VAX-11/780 announcement entry. PR: 200961 Submitted by: John Marshall Approved by: re (gjb)
* MFC: r279597 (and 259152,259219 as dependency)bapt2015-07-085-285/+223
| | | | | | | | | | | | | | | | | | | | | 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)
* MFC r284928: speed up ar(1) on UFS file systemsemaste2015-07-071-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r265096:garga2015-07-021-11/+13
| | | | | | | | | | | | | | | 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
* MFH (r277695): allow tracing dlfunc() / dlsym() eventsdes2015-06-301-0/+9
|
* MFC r284269, r284270, r284655, r284656, r284658:marcel2015-06-243-52/+76
| | | | | | | | | | 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)
* MFH: r284249brueffer2015-06-241-1/+1
| | | | | | Correct Hawaii's admission day. PR: 192651
* MFC r284604:tuexen2015-06-221-13/+39
| | | | | | | Don't leak sockets. Reported by: Coverity CID: 1306785
* MFC r284547:tuexen2015-06-221-7/+10
| | | | | | | | 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
* MFC r283285:trasz2015-06-211-1/+2
| | | | | | Advertise ctlstat(8) a little better. Sponsored by: The FreeBSD Foundation
* MFC r282238:trasz2015-06-211-1/+1
| | | | | | Remove spurious period. Sponsored by: The FreeBSD Foundation
* MFC r282236:trasz2015-06-211-5/+42
| | | | | | Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason. Sponsored by: The FreeBSD Foundation
* MFC r282213:trasz2015-06-211-0/+12
| | | | | | | | | | | | | | | | | | Add kern.racct.enable tunable and RACCT_DISABLED config option. The point of this is to be able to add RACCT (with RACCT_DISABLED) to GENERIC, to avoid having to rebuild the kernel to use rctl(8). MFC r282901: 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. Note those two are MFC-ed together, because the latter one changes the name of RACCT_DISABLED option to RACCT_DEFAULT_TO_DISABLED. Should have committed the renaming separately... Relnotes: yes Sponsored by: The FreeBSD Foundation
* MFC 279125, 279126, 279128, 279139:marcel2015-06-174-27/+78
| | | | | Add the -c option for specifying the capacity of the disk image. Bump the version to 20150222.
* MFC 284165:marcel2015-06-171-2/+2
| | | | | | Move contrib/top/top.X to contrib/top/top.xs and move contrib/top/top.local.H to contrib/top/top.local.hs. Change the makefile accordingly.
* MFC r284351:tuexen2015-06-162-84/+371
| | | | | | | | | | | | | | | | | | | | | | | | Simplify printaddr(). No functional change. MFC r284352: 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 r284353: 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 r284354: Add support for SCTP. MFC r284355: 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 r283001:eadler2015-06-101-1/+1
| | | | | | | ssh-copy-id: Add missing line continuation PR: 194301 Requested by: tuexen
* MFC 281887:jhb2015-06-025-5/+5
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC 281266:jhb2015-06-021-18/+0
| | | | | | | | | | | | 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.
* MFC 269128:jhb2015-06-023-15/+123
| | | | | | Create 32-bit core files for 32-bit processes on 64-bit machines. The 64-bit machine supported right now is amd64, but it's not too hard to add powerpc64.
* MFC r281202:tuexen2015-05-291-2/+2
| | | | The code says "or", not "either or". So fix the documentation.
* MFC r276774: ar: Avoid null pointer deref while reading corrupt archivesemaste2015-05-211-1/+2
| | | | | | | ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov <cherepan@mccme.ru> Sponsored by: The FreeBSD Foundation
* MFC r281959,282885 (fanf, partial),282888 (fanf):delphij2015-05-181-10/+129
| | | | | | | | | | | | | | | | Try alternate addresses more agressively. PR: 158125 Submitted by: Mark Andrews <marka isc org> (with changes from me) whois: code cleanup Use pedantically correct types. 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.
* MFC r274720:trasz2015-05-151-9/+18
| | | | | | Fix improper .Fx macro usage. Sponsored by: The FreeBSD Foundation
* MFC: r282437, r282438, r282439, r282462, r282463, r282464, r282466, r282467,bapt2015-05-152-56/+96
| | | | | | | | r282468, r282609 Update the list of known roff commands (both from NetBSD and heirloom doctools) Improve memory checking Remove limitation on input lines by using getline(3)
* MFC: r282449, r282450, r282451, r282452, r282453, r282454, r282455, r282457,bapt2015-05-155-218/+202
| | | | | | | | r282459, r282460, r282461 Modernize code: ansification, use c99 features Improve style(9) Better memory checking
* MFC: r282305, r282309, r282342, r282669, r282722bapt2015-05-152-63/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r282305: 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 r282309: Use defines to improve clarity r282342: Capsicumize col(1) r282669: Fix about ten integer overflows and underflows and a handful of logic errors in line number handling. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD r282722: 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
* MFC r282041: hexdump: Don't use uninitialized struct stat.jilles2015-05-101-1/+1
| | | | PR: 196194
* MFC r281617:bdrewery2015-04-301-0/+11
| | | | | | wc: Fix SIGINFO race causing final results to be lost to stderr. Relnotes: yes
* MFC r275805:tijl2015-04-301-2/+1
| | | | | | | | | | | | | Fix incorrect type of "invalids" argument in __iconv() prototype. MFC r281550,281591: 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
* MFC r281500,281540,281626:delphij2015-04-272-12/+25
| | | | | | Sync with NetBSD: - Mention xz(1) in gzip(1). - Strip away path from header name when decompressing.
* MFC r281311: ar: Disallow directory traversalemaste2015-04-241-1/+9
| | | | | | | | | | | | | | | | 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. Obtained from: ELF tool chain ar, Ticket #474 Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC r281582:bdrewery2015-04-231-1/+1
| | | | Remove extra flags from r250462.
* Replace LDFLAGS by LDADD to fix sort build with -DNO_SHAREDgarga2015-04-211-2/+2
| | | | | | | Differential Revision: https://reviews.freebsd.org/D2044 Reviewed by: sbruno@ Approved by: sbruno@ Sponsored by: Netgate
* MFC: r272135, r272174allanjude2015-04-161-1/+31
| | | | | | | Update man(1) to list the different sections of the manual Approved by: eadler (mentor, implicit) Sponsored by: ScaleEngine Inc.
OpenPOWER on IntegriCloud