summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* Send whois queries for gov.uk names to JANET.fanf2016-05-251-0/+1
|
* Fix humanized decoding of struct stat with respect to .st_mtimngie2016-05-221-1/+1
| | | | | | | | | | st_mtim was being incorrectly described as "stime=", not "mtime=". This was introduced with the original feature commit (r176471). MFC after: 1 week PR: 209699 Submitted by: naddy Sponsored by: EMC / Isilon Storage Division
* Add the density code for LTO-7 to libmt and the mt(1) man page.ken2016-05-201-1/+2
| | | | | | | | | | | The density code and bits per mm values were obtained from an actual drive density report. The number of tracks were obtained from an LTO-7 hardware announcement on IBM's web site. Sponsored by: Spectra Logic MFC after: 3 days
* Merge bmake-20160512sjg2016-05-201-2/+2
|
* Make code compile when basename() is POSIX compliant.ed2016-05-191-2/+2
| | | | | | | | | If basename() uses "char *", we shouldn't do the intermediate assignment, as that field is of type "const char *". Simply call basename() on the command line argument directly. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D6463
* Don't repeat the the word 'the'eadler2016-05-171-1/+1
| | | | | | | (one manual change to fix grammar) Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
* swprintf() and apparently wcsftime() want the their output buffer sizetruckman2016-05-171-3/+3
| | | | | | | | | specified in terms of the the number of wide characters and not sizeof(buffer). Reported by: Coverity CID: 1007605, 1007606 MFC after: 1 week
* Use != 0 to be clearsjg2016-05-171-1/+1
|
* Allow -f - to read from stdin.sjg2016-05-171-2/+3
|
* Fix off by one error that overflowed the rep_len array when doingtruckman2016-05-161-1/+1
| | | | | | | | the final NUL termination. Reported by: Coverity CID: 1007617 MFC after: 1 week
* Increase size of argv[] array to avoid running off the end.truckman2016-05-161-1/+1
| | | | | | Reported by: Coverity CID: 1193819 MFC after: 1 week
* install: Revert utimensat usage (r299850).jilles2016-05-162-20/+17
| | | | | | | | | This should fix the build on older stable/10, since install is a bootstrap tool. Pending a decision how to fix this properly, revert utimensat usage. Copies with the -p option will again appear older than the original almost always, but -p is not commonly used.
* Use NULL instead of 0 for pointers.araujo2016-05-163-6/+6
| | | | MFC after: 2 weeks
* install: When preserving timestamps, also copy the nanoseconds part.jilles2016-05-152-17/+20
|
* Always return either a dynamically allocated string or NULL fromtruckman2016-05-131-2/+2
| | | | | | | | | | expand(). Never return the name parameter, which could be a the buf[] buffer which is allocated on the stack by getdeadletter() and which would then be used after getdeadletter() has returned. Reported by: Coverity CID: 1199383 MFC after: 1 week
* Instead of ignoring the EEXIST from link(), unconditionally unlinktruckman2016-05-131-2/+4
| | | | | the terget before calling link(). This should prevent links to an old copy of the file from being retained.
* Simplify some overly complex code so that both humans and Coveritytruckman2016-05-131-5/+6
| | | | | | | have a better chance of understanding it. Reported by: Coverity CID: 1009684, 1006931
* If fchdir() fails, call err() instead of warn().truckman2016-05-121-1/+1
|
* Avoid Coverity NUL termination warning about strncpy() by usingtruckman2016-05-121-3/+8
| | | | | | | | | | | | | | | | memcpy() instead. It's probably a bit more optimal in this case anyway. [1] The program logic leading up to the creation of the strncpy/memcpy destination buffer is a bit hairy. Add a call to assert() to make it clear what is happening here and detect any potential buffer overruns in the future. Check a couple syscall error returns. Ignore the EEXIST error from link() to preserve existing behavior. [2] [3] Reported by: Coverity CID: 1009659 [1], 1009349 [2], 1009350 [3]
* MFV r299425:mm2016-05-128-4/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update libarchive to 3.2.0 New features: - new bsdcat command-line utility - LZ4 compression (in src only via external utility from ports) - Warc format support - 'Raw' format writer - Zip: Support archives >4GB, entries >4GB - Zip: Support encrypting and decrypting entries - Zip: Support experimental streaming extension - Identify encrypted entries in several formats - New --clear-nochange-flags option to bsdtar tries to remove noschg and similar flags before deleting files - New --ignore-zeros option to bsdtar to handle concatenated tar archives - Use multi-threaded LZMA decompression if liblzma supports it - Expose version info for libraries used by libarchive Patched files (fixed compiler warnings): contrib/libarchive/cat/bsdcat.c (vendor PR #702) contrib/libarchive/cat/bsdcat.h (vendor PR #702) contrib/libarchive/libarchive/archive_read_support_format_mtree.c (PR #701) contrib/libarchive/libarchive_fe/err.c (vendor PR #703) MFC after: 1 month Relnotes: yes
* Use strlcpy() instead of strncpy() when copying date and subjtruckman2016-05-121-3/+3
| | | | | | | | | to ensure that these are properly NUL terminated since they are passed to printf(). Reported by: Coverity CID: 974770 MFH: 1 week
* Use strlcpy() instead of strncpy() when copying the encoding valuetruckman2016-05-121-1/+1
| | | | | | | | | | | | | to ensure that the destination is NUL terminated. Length truncation of one more character should not be an issue since encoding values that long are not supported by libc. The destination string is treated as a NUL terminated string, but it is only passed to strcmp() for comparison to a set of shorter, fixed length strings, so this is not a serious problem. Reported by: Coverity CID: 974769 MFC after: 1 week
* rpcgen(1): Tag crash() routine as __dead2 for static analyzerscem2016-05-122-2/+2
| | | | | | Suggested by: Coverity CID: 1305464 Sponsored by: EMC / Isilon Storage Division
* chat(8): use NULL instead of zero for initializing a pointer.pfg2016-05-121-1/+1
|
* random(6): Fix double-closecem2016-05-111-2/+5
| | | | | | | | | | | | | In the case where a file lacks a trailing newline, there is some "evil" code to reverse goto the tokenizing code ("make_token") for the final token in the file. In this case, 'fd' is closed more than once. Use a negative sentinel value to guard close(2), preventing the double close. Ideally, this code would be restructured to avoid this ugly construction. Reported by: Coverity CID: 1006123 Sponsored by: EMC / Isilon Storage Division
* whois(1): Fix potential double-close and logic mistakescem2016-05-111-3/+9
| | | | | | | | | | | | | | Close the fd the poll error was detected on, rather than the last opened fd, to fix the double-close. Use -1 to make it explict which int variables no longer own socket file descriptors. Actually shrink, rather than grow, the poll timeout to match comment. Reported by: Coverity CID: 1304860, 1305616 Sponsored by: EMC / Isilon Storage Division
* whois(1): Pull out async multiple host connection code into a routinecem2016-05-111-12/+22
| | | | | | | | | | This logic was added to the whois() function in r281959, but could easily be its own routine. In this case, I think the abstraction makes both functions easier to reason about. This precedes some Coverity-suggested cleanup. Sponsored by: EMC / Isilon Storage Division
* Fix buffer overrun in gcore(1) NT_PRPSINFOcem2016-05-111-2/+2
| | | | | | | | | | | | | Use size of destination buffer, rather than a constant that may or may not correspond to the source buffer, to restrict the length of copied strings. In particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1. Use strlcpy instead of strncpy to ensure the result is nul-terminated. This seems to be what is expected of these fields. Reported by: Coverity CIDs: 1011302, 1011378 Sponsored by: EMC / Isilon Storage Division
* sdiff(1): Fix potential NULL deref in cleanup pathcem2016-05-101-1/+2
| | | | | | | | | In the presence of the --diff-pid argument, it is possible for 'diffpipe' to be NULL. Only fclose() it if it was initialized. Reported by: Coverity CID: 1355183 Sponsored by: EMC / Isilon Storage Division
* sed.1: Correction for the case insensitive case.pfg2016-05-101-2/+2
| | | | | | | | Use the capital I instead of the lowercase. Submitted by: Mikhail T. PR: 195929 MFC after: 2 weeks
* Rename getline with get_line to avoid collision with getline(3)bapt2016-05-101-5/+5
| | | | | When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard
* Rename getline with get_line to avoid collision with getline(3)bapt2016-05-102-8/+8
| | | | | When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard
* Rename getline with get_line to avoid collision with getline(3)bapt2016-05-107-18/+18
| | | | | | | When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Obtained from: NetBSD
* Revert r299279:pfg2016-05-101-1/+6
| | | | | | | | | | | | | | | | | Simplify redundant malloc'ing in sed -e. It is causing havoc in the ports tree: ===> Configuring for wxsvg-1.5.7 sed: 1: "/gcc_dir=\\`/s/gcc /$CC /": bad flag in substitute command: '/' *** Error code 1 ===> Patching for vips-8.3.1 sed: 1: "1s|^#![[:space:]]*/usr/ ...": bad flag in substitute command: 's' *** Error code 1 PR: 195929 Reported by: danilo
* DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.bdrewery2016-05-092-2/+2
| | | | | | This avoids running target binaries. Sponsored by: EMC / Isilon Storage Division
* Rationalize license numberingbapt2016-05-092-2/+2
|
* Some style(9) fixesbapt2016-05-091-11/+7
| | | | | | No functional changes Obtained from: OpenBSD
* Add myself (woodsb02) to the calendar.freebsd filewoodsb022016-05-091-0/+1
| | | | | Approved by: adamw (mentor) Differential Revision: https://reviews.freebsd.org/D6276
* Simplify redundant malloc'ing in sed -e.pfg2016-05-091-6/+1
| | | | | | | | | | | | | | When encountering an -e argument, sed currently mallocs a string to COPY the optarg -- with '\n' appended. The appendage does not seem necessary -- indeed, the same call to add_compunit processing the sole command (given without -e) passes the *argv verbatim: without making a copy, and without appending newline. This matches what is done in other BSDs. Submitted by: Mikhail T. PR: 195929 MFC after: 2 weeks
* install: Add some tests.jilles2016-05-083-0/+349
|
* Only one program is build in usr.bin/sdiff use the right includebapt2016-05-071-1/+1
|
* Revert r299218 VISUAL is actually a perfecly valid env to specify an editorbapt2016-05-072-3/+20
|
* Only use EDITOR as a variable to specify which text editor to usebapt2016-05-072-20/+3
|
* Directly call the editor if needed instead of spawning /bin/shbapt2016-05-071-8/+4
|
* Replace fparseln(3) with getline(3)bapt2016-05-072-9/+11
| | | | It removes a dependency on libutil.
* sed: rewrite the main loop.pfg2016-05-071-49/+43
| | | | | | | | | | | Rewrite the main loop of the "sed s/..." command, shortening it by ten lines and simplifying it by removing the switch statement implementing /g, /1, and /2 separately and repetitively. This will be needed to bring a fix from OpenBSD later. Obtained from: OpenBSD (schwarze CVS Rev. 1.18) MFC after: 3 weeks
* Add the "-r" flag to iscsictl(8).trasz2016-05-062-4/+25
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Document the "Protocol" field of iscsi.conf(5).trasz2016-05-061-1/+9
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-0485-1098/+860
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* DIRDEPS_BUILD: Update dependencies.bdrewery2016-05-041-0/+1
| | | | Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud