summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r306722:sevan2016-10-161-1/+6
| | | | | | | | | Add history section for test(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c PR: 211789 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306721:sevan2016-10-161-1/+6
| | | | | | | | | Add history section for stty(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1 PR: 211788 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306720:sevan2016-10-161-1/+6
| | | | | | | | | Add history section of pwd(1) http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c PR: 211787 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306719:sevan2016-10-161-1/+17
| | | | | | | | | Document origins of expr & authors http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1 PR: 173979 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306718:sevan2016-10-161-1/+6
| | | | | | | | | | Add history section for echo(1) Sourced using the draft copy of the second edition manual http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf PR: 211785 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306582:sevan2016-10-101-6/+5
| | | | | | | | | | "POSIX doesn't specify -h." - r1.27 from NetBSD http://man.openbsd.org/?query=chmod&apropos=0&sec=0&arch=default&manpath=POSIX-2013 PR: 212337 Approved by: bcr (mentor) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D8118
* MFC r306581:sevan2016-10-101-2/+2
| | | | | | | | Use .At macro instead of specifying AT&T UNIX literaly. PR: 212034 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8114
* MFC r306714:sevan2016-10-101-1/+9
| | | | | | | | | Document where chio(1) originated from & which version of FreeBSD first included it. PR: 211776 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306584:sevan2016-10-101-5/+7
| | | | | | | | | | | Move the description of CHANGER variable to ENVIRONMENT section rather than in the DESCRIPTION section. From OpenBSD src/bin/chio/chio.1 r1.23 PR: 212158 Approved by: bjk Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D8117
* MFC r305841ache2016-09-221-6/+31
| | | | Implement multibyte encoding support for -v with fallback
* MFC r302937ache2016-08-185-1/+39
| | | | | | Path generation was not according to collate Approved by: jilles
* MFC r303423:kib2016-08-151-0/+1
| | | | Force SIGSTOP to be the first signal reported after the attach.
* MFC 302900,302902,302921,303461,304009:jhb2016-08-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed.
* MFC r303213:kib2016-07-301-0/+1
| | | | | | Add missed required call to xo_finish() when only header is printed. Approved by: re (gjb)
* WITH_META_MODE: Fix bin/csh rebuilding tc.const.hbdrewery2016-06-141-1/+1
| | | | | | | | | | This is the same issue as r297997, but was missed in it. The WARNS value changes between 'build-tools' (MK_WARNS=no) and 'everything' resulting in a rebuild of this file. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division
* Explicitly NUL terminate the buffer filled by fread().truckman2016-06-081-3/+3
| | | | | | | | | | | | | The fix in r300649 was not sufficient to convince Coverity that the buffer was NUL terminated, even with the buffer pre-zeroed. Swap the size and nmemb arguments to fread() so that a valid lenght is returned, which we can use to terminate the string in the buffer at the correct location. This should also quiet the complaint about the return value of fread() not being checked. Reported by: Coverity CID: 1019054, 1009614 MFC after: 1 week
* sh: Improve descriptions in 'ulimit -a' output.jilles2016-06-051-2/+2
| | | | | The format limits descriptions to 18 characters and is not changed, so the descriptions do not describe the limits exactly.
* WITH_META_MODE: Don't expect meta files for side-effect generated files.bdrewery2016-06-031-0/+3
| | | | | | | | | The first file in these lists will generate everything else so only it should be getting a .meta file. With bmake's missing=yes meta feature these would otherwise cause a rebuild without the .NOMETA hint. Sponsored by: EMC / Isilon Storage Division
* ps(1): Expand variables to match expanded fieldscem2016-06-012-2/+2
| | | | | | | | ki_flag and ki_tdflag have been 'long', not 'int', since 2000 and 2005, respectively. Submitted by: Shawn Wills <swills at isilon dot com> Sponsored by: EMC / Isilon Storage Division
* The (i < PROMPTLEN - 1) test added by r300442 in the code for the defaulttruckman2016-06-011-1/+1
| | | | | | | | | | | case of \c in the prompt format string is a no-op. We already passed this test at the top of the loop, and i has not yet been incremented in this path. Change this test to (i < PROMPTLEN - 2). Reported by: Coverity CID: 1008328 Reviewed by: cem MFC after: 1 week
* Clarify the explanations for the hostname and FQDN entries.wblock2016-05-311-3/+3
| | | | MFC after: 1 week
* Use require.progs with bc instead of require.files with /usr/bin/bcngie2016-05-291-1/+1
| | | | | | | | This will make things more flexible if the program path changes in the future, and the test in and of itself doesn't call /usr/bin/bc -- it just calls bc MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Close the input FILE * in read_file() and the output FILE * in write_file()truckman2016-05-251-9/+18
| | | | | | | | | | if read_stream() or write_stream() fails to avoid leaking the FILE. Reported by: Coverity CID: 977702 Reviewed by: pfg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6554
* Fix Coverity CID 1019054 (String not null terminated) in setfacl.truckman2016-05-251-2/+2
| | | | | | | | | Increase the size of buf[] by one to allow room for a NUL character at the end. Reported by: Coverity CID: 1019054 MFC after: 1 week
* Fix CID 1011370 (Resource leak) in ps.truckman2016-05-252-8/+11
| | | | | | | | | | | | | There is no need to to call strdup() on the value returned by fmt(). The latter calls fmt_argv() which always returns a dynamically allocated string, and calling strdup() on that leaks the memory allocated by fmt_argv(). Wave some const magic on ki_args and ki_env to make the direct assignment happy. This requires a tweak to the asprintf() case to avoid a const vs. non-const mismatch. Reported by: Coverity CID: 1011370 MFC after: 1 week
* Close from_fd if malloc() fails to avoid a file descriptor leak.truckman2016-05-251-0/+1
| | | | | | Reported by: Coverity CID: 1007203 MFC after: 1 week
* Match the descriptions of the \H and \h prompt string sequences to reality.truckman2016-05-251-3/+3
| | | | | | | They were swapped. X-Confirmed by: jilles MFC after: 1 week
* Hopefully fix Coverity CID 1008328 (Out-of-bounds write) in /bin/sh.truckman2016-05-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the magic constant 127 in the loop interation count with "PROMPTLEN - 1". gethostname() is not guaranteed to NUL terminate the destination string if it is too short. Decrease the length passed to gethostname() by one, and add a NUL at the end of the buffer to make sure the following loop to find the end of the name properly terminates. The default: case is the likely cause of Coverity CID 1008328. If i is 126 at the top of the loop interation where the default case is triggered, i will be incremented to 127 by the default case, then incremented to 128 at the top of the loop before being compared to 127 (PROMPTLENT - 1) and terminating the loop. Then the NUL termination code after the loop will write to ps[128]. Fix by checking for overflow before incrementing the index and storing the second character in the buffer. These fixes are not guaranteed to satisfy Coverity. The code that increments i in the 'h'/'H' and 'w'/'W' cases may be beyond its capability to analyze, but the code appears to be safe. Reported by: Coverity CID: 1008328 Reviewed by: jilles, cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6482
* ed(1): simplify by using arc4random_buf().pfg2016-05-211-4/+1
| | | | Suggested by: ed
* ed(1): Cleanups for the DES mode.pfg2016-05-201-2/+2
| | | | | | | | | - Use arc4random_uniform(3). - Prevent a segmentation fault when ed receives a signal while being in getpass(). [1] Obtained from: OpenBSD [1] (CVS Rev. 1.15) MFC after: 2 weeks
* Rename getline with get_line to avoid collision with getline(3)bapt2016-05-101-14/+14
| | | | | | | 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
* DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.bdrewery2016-05-092-3/+3
| | | | | | This avoids running target binaries. Sponsored by: EMC / Isilon Storage Division
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-0419-526/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* sh: Handle empty hostname and $PWD when building promptvangyzen2016-05-041-2/+3
| | | | | | | | | | | If the hostname is empty and \h is used in $PS1, the remainder of the prompt following \h will be empty. Likewise for $PWD and \w. Fix it. Reviewed by: jilles MFC after: 1 week Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D6188
* Fix including Kyuafile in packaged base system.gjb2016-04-291-1/+2
| | | | | | | | | | | | Fix a related typo while here. Note, this change results in the Kyuafile inclusion in the runtime package, which needs to be fixed, however addresses the PR as far as I can tell in my tests. PR: 209114 Submitted by: ngie Sponsored by: The FreeBSD Foundation
* ed(1): switch two statements so we check the index before dereferencing.pfg2016-04-261-1/+1
| | | | | | This is related to r270256 but was missed in that occasion. MFC after: 3 days
* Stop using sbrk in csh. This is a legacy interface and its use within cshandrew2016-04-261-1/+1
| | | | | | | is invalid. It is used to find the size of allocated memory. As malloc may allocate memory with mmap it will fail to take this memory into account. Obtained from: brooks
* Use NULL instead of 0 for pointers.araujo2016-04-191-1/+1
| | | | | | kvm_open(3) will return NULL when it cannot access kernel virtual memory. MFC after: 2 weeks.
* Use NULL for pointers instead of 0.araujo2016-04-191-1/+1
| | | | MFC after: 2 weeks.
* sh: Write LINENO value to stack string directly.jilles2016-04-161-4/+6
|
* MFHgjb2016-04-163-7/+5
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * META_MODE: Don't rebuild build-tools targets during normal build.bdrewery2016-04-142-4/+4
| | | | | | | | | | | | | | | | | | This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division
| * sh: Simplify code by removing variable bracketed_name.jilles2016-04-131-3/+1
| |
| * rcp(1): replace 0 with NULL for pointers.pfg2016-04-111-1/+1
| | | | | | | | Found with devel/coccinelle.
* | MFHgjb2016-04-121-1/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | MFHgjb2016-04-116-11/+11
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * sh(1): replace 0 with NULL for pointers.pfg2016-04-092-2/+2
| | | | | | | | | | | | Found with devel/coccinelle. Reviewed by: jilles
| * sh: Fix some unquoted variables in tests.jilles2016-04-093-7/+7
| | | | | | | | | | The builtins/getopts1.0 test failed if a single-character file existed in the current directory.
| * Revert r296416 by removing SAVESIGVEC and switching to fork instead. Thismp2016-04-071-2/+2
| | | | | | | | | | | | | | | | fixes usage with system libraries which maintain their own signal state. PR: 208132 Obtained from: kib MFC after: 3 days
* | MFHgjb2016-04-045-4/+17
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud