summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Merge r320645 from stable/11 into releng/11.1:allanjude2017-07-041-1/+10
| | | | | | | Add deprecation notices for all rcmd tools Approved by: re (gjb) Relnotes: yes
* MFC r314655:ngie2017-05-305-7/+7
| | | | | | bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output
* MFC r314833rgrimes2017-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Convert absolute links to relative links. Style.Makefile(9) has been ignored to produce minimal diffs. MFC r314837 The relative symlink fix causes downstream issues for EMC DELL Isilon so revert the relative symlink fix pending a better solution. Reported by: ngie MFC r315091 Revert r314833 until the problem with INSTALL_RSYMLINKS can be found as it appears to break arm release builds. PR: 217705 Reported by: cyclaero@gmail.com Approved by: grehan (mentor)
* MFC r317904:trasz2017-05-231-0/+1
| | | | .Xr resizewin from stty(1) man page.
* MFC r317912: sh: Fix INTOFF leak after a builtin with different localejilles2017-05-143-1/+7
| | | | | | | | settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely.
* MFC r316430vangyzen2017-05-011-5/+5
| | | | | | | | | | | | Fix indentation in dd(1) Quoting http://mdocml.bsd.lv/mdoc/details/width.html Do not use macros in the argument specifying the width, since that's not portable. While GNU troff can handle it, mandoc cannot. Sponsored by: Dell EMC
* MFC r315948:dchagin2017-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | Update tcsh to 6.20.00 MFC r315952: Update tcsh to vendor git b605cb561d Vendor changes: 1. PR/471: Daiki Ueno: Delay interpreting arginp until we've processed our startup files (which can change the NLS environment). 2. Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar). 3. Fix out of bounds read (Brooks Davis) (reproduce by starting tcsh and hitting tab at the prompt). 4. Don't play pointer tricks that are undefined in modern c (Brooks Davis).
* MFC r314886,r314943,r314944:bdrewery2017-03-226-11/+349
| | | | | | | | | r314886: pwait: Add a -t flag to specify a timeout before exiting, and tests. r314943: Remove unneeded -x from tests. r314944: Rename some tests to end in _test.
* MFC r314714:bdrewery2017-03-221-3/+7
| | | | Don't kill pid -1 on overflow from strtol(3).
* MFC r315005: sh: Fix executing wrong command with ${x#$(y)}$(z).jilles2017-03-183-1/+9
| | | | | | | | | | | | | | | | The parsed internal representation of words consists of a byte string with a list of nodes (commands in command substitution). Each unescaped CTLBACKQ or CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list. If param in ${param#%##%%word} is not set, the word is not expanded (in a deviation of POSIX shared with other ash variants and ksh93). Erroneously, the pointer in the list of commands (argbackq) was not advanced. This caused the wrong command to be executed later if the outer word contained another command substitution. Example: echo "${unsetvar#$(echo a)}$(echo b)" wrote "a" but should write "b".
* MFC r314686: sh: Fix crash if a -T trap is taken during command substitutionjilles2017-03-124-2/+19
| | | | | | | | | | | | | | | Code like t=$(stat -f %m "$file") segfaulted if -T was active and a trap was taken while the shell was waiting for the child process to finish. What happened was that the dotrap() call in waitforjob() was hit. This re-entered command execution (including expand.c) at a point not expected by expbackq(), and global state (unallocated stack string and argbackq) was corrupted. To fix this, change expbackq() to prepare for command execution to be re-entered. Reported by: bdrewery
* MFC r314637: sh: Add some already working tests that exercise new code pathsjilles2017-03-124-0/+20
|
* MFC r313798:kib2017-02-231-4/+4
| | | | Use uintmax_t to print st_nlink.
* MFC r313659-r313673bapt2017-02-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r313659: Remove space at and of line Reported by: make manlint MFC after: 2 days r313660: Remove empty Li Reported by: make manlint MFC after: 2 days r313661: Escape Ss to avoid confusion by mdoc parser with the Ss macro Reported by: make manlint MFC after: 2 days r313662: Add missing -width after -Bl -tag Reported by: make manlint MFC after: 2 days r313663: Add missing section after .Xr reference r313664: Escape No to avoid confusion with the No macro r313665: Remove useless .Pp after the .Sh macro and remove empty line r313666: Remove empty space at EOL and escept Ed r313667: Remove spaces at EOL and sort correctly the SEE ALSO section r313668: Add missing section in manpage reference r313669: Properly use .An macro before Authors name r313670: Escape Sm to avoid confusion with Sm macro r313671: Use correct date format r313672: Remove useless Li macro r313673: Remove spaces at end of line Reported by: make manlint
* Add history section for dd(1)sevan2017-02-031-1/+6
| | | | | | | | | First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* In v3 UNIX, the kill utility is documented in category 8, not 1.sevan2017-02-031-2/+3
| | | | | | | | | | Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105
* MFC r311522:kib2017-01-131-1/+2
| | | | Use type-independent formats for printing nlink_t and ino_t.
* MFC r310118asomers2017-01-121-1/+1
| | | | | | | | Fix ls_tests:o_flag with ZFS TMPDIR Unlike UFS or TMPFS, ZFS sets uarch automatically whenever a file is updated. The test must explicitly clear uarch to be portable across filesystems. Also, it doesn't need to run as root.
* MFC r310367:pfg2016-12-261-1/+4
| | | | | | | | | | pax(1): Fix a bug with archives smaller than 512 bytes. The problem here is that the archive is too short (< 512 bytes). The buffer routines, try to read at least 512 bytes, even when we try to determine what format file we have, which is wrong. Obtained from: NetBSD (CVS rev 1.26)
* MFC r309873:pfg2016-12-263-4/+4
| | | | | | | ed(1): Prevent possible overflows during allocation. Make sure the parameters used for malloc(3) can hold size_t sizes. This should help ed(1) handle bigger data in the future.
* MFC r310088, r310090, r310095brooks2016-12-212-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | r310088: Put the undocumented df feature of mounting filesystems from device nodes under an ifdef. Leave enabled. Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 r310090: Mount filesystems without executable permissions since they should never be used. Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 r310095: Use nmount(2) rather than the obsolete mount(2). Reviewed by: cem Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513
* MFC r309676vangyzen2016-12-151-6/+10
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFC r309238,309239:delphij2016-12-121-12/+12
| | | | | r309238: Plug a potential memory leak. r309239: style(9).
* MFH (r308297): use what(1) instead of strings(1).des2016-12-101-2/+2
| | | | | PR: 213665 Submitted by: Pawel Worach <pawel.worach@gmail.com>
* MFC r305358:ngie2016-12-031-0/+8
| | | | | | | | | | | | | | | | | | | | | Update contrib/netbsd-tests with new content from NetBSD This updates the snapshot from 09/30/2014 to 08/11/2016 This brings in a number of new testcases from upstream, most notably: - bin/cat - lib/libc - lib/msun - lib/libthr - usr.bin/sort lib/libc/tests/stdio/open_memstream_test.c was moved to lib/libc/tests/stdio/open_memstream2_test.c to accomodate the new open_memstream test from NetBSD. Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox
* MFC r308443, r308459, r308462, r308478, r308786araujo2016-11-252-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r308443: Add -d flag that prints domain only. PR: 212875 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Reviewed by: pi r308459: Fix missing '-' for the flags -s and -d on both manpage and usage. Reported by: garga, bde r308462: Add flag -B which does the same like batch mode but without exiting after print. Also add a new flag -s that add blocks size to statistics. PR: 198347, 212726 Submitted by: Ben RUBSON <ben.rubson@gmail.com> Tested by: pi MFC After: 2 weeks. r308478: We can't use protect(1) inside a jail(8)! To avoid have warning for services that are using oomprotect, oomprotect will only be applied on services that won't run inside jails. Reported by: allanjude MFC after: 2 weeks. r308786: rc.subr: Swap checks so we only fork sysctl if *_oomprotect is set.
* 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
OpenPOWER on IntegriCloud