aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Document the use of the vfs.nfsd sysctls that control the size ofRick Macklem2014-08-101-1/+19
| | | | | | | | | | the NFS server's DRC for TCP. This is a content change. MFC after: 1 week Notes: svn path=/head/; revision=269788
* Support PCI extended config space in bhyve.Neel Natu2014-08-085-82/+209
| | | | | | | | | | | | | | | | | | Add the ACPI MCFG table to advertise the extended config memory window. Introduce a new flag MEM_F_IMMUTABLE for memory ranges that cannot be deleted or moved in the guest's address space. The PCI extended config space is an example of an immutable memory range. Add emulation for the "movzw" instruction. This instruction is used by FreeBSD to read a 16-bit extended config space register. CR: https://phabric.freebsd.org/D505 Reviewed by: jhb, grehan Requested by: tychon Notes: svn path=/head/; revision=269700
* Give a brief message as to what error was encountered to help the user along.Andrew Thompson2014-08-072-27/+35
| | | | | | | | Reviewed by: nwhitehorn MFC after: 2 weeks Notes: svn path=/head/; revision=269653
* Rework privatelib/internallibBaptiste Daroussin2014-08-065-5/+5
| | | | | | | | | | | | | | | | | Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing in final installation Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to internal/privatelib Directly link to the .so in case of private library to avoid having to complexify LDFLAGS. Phabric: https://phabric.freebsd.org/D553 Reviewed by: imp, emaste Notes: svn path=/head/; revision=269648
* Check gethostname(2) return code - but even if it succeeds it may notPeter Wemm2014-08-051-2/+5
| | | | | | | | | | | | | null terminate. Temporarily use "From: $user@$hostname" rather than "From: $user". The latter exposes incompatible behavior if using dma(8). sendmail(8) (and other alternatives) canonify either form on submission (even if masquerading), but dma will leak a non-compliant address to the internet. Notes: svn path=/head/; revision=269550
* Added support for extra ifconfig args to jail ip4.addr & ip6.addr paramsSteven Hartland2014-08-043-17/+80
| | | | | | | | | | | | | | | | | | | This allows for CARP interfaces to be used in jails e.g. ip4.addr = "em0|10.10.1.20/32 vhid 1 pass MyPass advskew 100" Before this change using exec.prestart to configure a CARP address would result in the wrong MAC being broadcast on startup as jail creates IP aliases to support ip[4|6].addr before exec.prestart is executed. PR: 191832 Reviewed by: jamie MFC after: 1 week X-MFC-With: r269340 Phabric: D528 Sponsored by: Multiplay Notes: svn path=/head/; revision=269522
* Add required `exec' before Xdialog(1) invocation for the case where weDevin Teske2014-08-031-1/+11
| | | | | | | | | | | expect (require) data on stdin. The effect of this is that, when backgrounded, $! returns the pid of an Xdialog(1) instance instead of an sh(1) instance -- the difference being a later kill of $! will reach the Xdialog(1) instance whereas without the exec the kill succeeds on the sh(1) instance leaving Xdialog(1) open. Notes: svn path=/head/; revision=269460
* Update command and add check for edge-case.Devin Teske2014-07-311-1/+5
| | | | Notes: svn path=/head/; revision=269354
* Fix a syntax error when running under bash(1) for portability.Devin Teske2014-07-311-4/+8
| | | | Notes: svn path=/head/; revision=269352
* Define a setvar() function for platforms using a shell unlike FreeBSD'sDevin Teske2014-07-311-0/+26
| | | | | | | | sh(1) for `/bin/sh' (e.g., bash(1) which lacks a setvar definition). This is to improve portability to other Operating Systems (e.g., Linux). Notes: svn path=/head/; revision=269351
* Commands which encounter a fatal error shouldn't be marked as completed.Tycho Nightingale2014-07-301-6/+8
| | | | | | | | | | Furthermore, provide an indication of the current command so it can be determined which one actually failed. Reviewed by: grehan Notes: svn path=/head/; revision=269317
* mdoc: kill EOL whitespace.Joel Dahl2014-07-293-6/+6
| | | | Notes: svn path=/head/; revision=269251
* Fix r269183 build woth GCC.Alexander Motin2014-07-281-5/+10
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=269191
* Add netmasks support to initiator-portal option.Alexander Motin2014-07-284-17/+92
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=269183
* The previous commit (r269119) introduced a regression: It removed theStefan Eßer2014-07-261-2/+2
| | | | | | | | | | | | | | | | | ability to specify the the full path name of the keymap file. Instead leave the original search order intact, but insert the path for newcons-specific fonts (if run on a system using newcons): - KEYMAP_PATH in environment - full path name - /usr/share/vt/keymaps (only if newcons is in use!) - /usr/share/syscons/keymaps (also as fall-back for newcons) MFC after: 1 week Notes: svn path=/head/; revision=269120
* Fix obvious off by one error: prefix[1] should be set to the path of theStefan Eßer2014-07-261-1/+1
| | | | | | | | | | | newcons specific keymap files, not prefix[2]. The result of this bug was that kbdcontrol ignored the files in the syscons keymap directory, which apparently still work under newcons, for most locales. MFC after: 1 week Notes: svn path=/head/; revision=269119
* Simplify the meaning of return values from the inout handlers. After thisNeel Natu2014-07-256-56/+42
| | | | | | | | | | | | | change 0 means success and non-zero means failure. This also helps to eliminate VMEXIT_POWEROFF and VMEXIT_RESET as return values from VM-exit handlers. CR: D480 Reviewed by: grehan, jhb Notes: svn path=/head/; revision=269094
* Strip the patch level from the release name before trying to fetch theDag-Erling Smørgrav2014-07-241-0/+1
| | | | | | | | | | | distribution. PR: 170264 Approved by: nathanw MFC after: 1 week Notes: svn path=/head/; revision=269074
* Reduce the proliferation of VMEXIT_RESTART in task_switch.c.Neel Natu2014-07-241-76/+94
| | | | | | | | This is in preparation for further simplification of the return values from VM exit handlers in bhyve(8). Notes: svn path=/head/; revision=269043
* Fix fault injection in bhyve.Neel Natu2014-07-243-9/+27
| | | | | | | | | | | | | | The faulting instruction needs to be restarted when the exception handler is done handling the fault. bhyve now does this correctly by setting 'vmexit[vcpu].inst_length' to zero so the %rip is not advanced. A minor complication is that the fault injection APIs are used by instruction emulation code that is shared by vmm.ko and bhyve. Thus the argument that refers to 'struct vm *' in kernel or 'struct vmctx *' in userspace needs to be loosely typed as a 'void *'. Notes: svn path=/head/; revision=269042
* Fix a bug where include file `networking/services.subr' was not beingDevin Teske2014-07-232-35/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | properly clustered. Change `fixedsize' to `fixedsize = true' to satisfy newer versions of dot(1) generating error "Warning: <stdin>: syntax error in line 27 near ','". Remove bounding cluster surrounding various include-groupings, allowing groups of include files to float freely to the greatest consumer (reducing the density of rendered diagrams). While here, change the bgcolor of include clusters from white to X11 color `thistle' (a light purple). Also, add the word "Subroutines" after include cluster labels. Do not terminate the digraph definition with a semi-colon [;] after the ending brace to satisfy newer versions of dot(1) generating error "Warning: <stdin>: syntax error in line 940 near ';'". MFC after: 3 days X-MFC-to: stable/10, stable/9 Notes: svn path=/head/; revision=269027
* Emulate instructions emitted by OpenBSD/i386 version 5.5:Neel Natu2014-07-235-26/+20
| | | | | | | | | | - CMP REG, r/m - MOV AX/EAX/RAX, moffset - MOV moffset, AX/EAX/RAX - PUSH r/m Notes: svn path=/head/; revision=269008
* Add example script `add_some_packages.sh', demonstrating how to installDevin Teske2014-07-2213-133/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a list of packages using the bsdconfig(8) API, providing dialog(8) based user experience (versus plain console output were you to use pkg(8) directly to install the same list of packages). Remove example script `browse_packages_ftp.sh', made obsolete because the digests.txz and packagesite.txz databases for pkg(8) are not available via FTP (HTTP only to pkg.freebsd.org SRV hosts). Update example script `browse_packages_http.sh', made to work with new pkg(8) demonstrating how to generate a local package repository. Fix a bug in `bsdconfig packages' where packages were listed twice. This fix requires pkg(8) version 1.2.7_4 or higher. NB: It is the introduction of pkg(8) 1.2.7_4 wherein I am also able to drastically reduce the generation time of package dependencies prior to the dialog display (by utilizing the new `-I' flag to pkg-rquery(8)). While here, fix a positional argument nit for f_index_initialize() of `packages/index.subr' include (the one and only argument is positional argument 1 to state the by-ref handle, indicating the variable to set in the caller's namespace; the nit I'm fixing here is that we were querying positional argument 2 for this information incorrectly; caused by a missing hunk back around SVN r257795). Fix a bug in sysrc(8) described by PR bin/187458 "sysrc(8) silently and unexpectedly bootstraps pkg". This was caused by an explicit entry in `/usr/share/bsdconfig/common.subr' (used by sysrc(8)) that called pkg(8) to populate the $PKG_ABI global (called in a way that allows implicit bootstrap of pkg(8)). The solution to which was to find every place in bsdconfig(8) that requires the $PKG_ABI global and add a layer of protection by way of introducing the new API call f_musthavepkg_init() (provided by new include, `/usr/share/bsdconfig/packages/musthavepkg.subr' intented to mirror `/usr/share/bsdconfig/mustberoot.subr'). When the $PKG_ABI global is required, you can use `f_musthavepkg_init' to cause graceful premature termination in the event that pkg(8) has not yet been bootstrapped, and thus cannot be used to populate $PKG_ABI. NB: If running interactively ($nonInteractive is NULL or unset), the f_musthavepkg_init() API call will attempt to bootstrap pkg(8), but only if the user chooses "Yes" to a Yes/No dialog confirming it is ok to bootstrap. While here, simplify an if-conditional in `media/http.subr' include to use sh(1) inline assignment-with-break. Also, fix a bug in `media/http.subr' and `media/httpproxy.subr' wherein the error messages for various HTTP failures were not finding their way to the console (needed to pass stdout to pass-thru descriptor). While here, remove the executable bit from `packages/categories.subr', `packages/index.subr', and `packages/packages.subr' includes. Fix issues where pkg(8) complains about PACKAGESITE being defined. Previously, we would set $PACKAGESITE and export it. Now we only set $PACKAGESITE for invocations of "pkg update" -- getting rid of all the spurious warnings about PACKAGESITE being deprecated (it's still used in the case of "pkg update" for simplicity versus having to configure a config-file). Remove the leading argument from invocations of f_index_initialize() in `packages/packages.subr' include. The leading argument no longer means what it used to, pre SVN r257995). PR: bin/187458 Reviewed by: nwhitehorn MFC after: 1 week X-MFC-to: stable/10, stable/9 Notes: svn path=/head/; revision=268999
* Correct spelling errors in ctld.8. While here, correct similar errorsWarren Block2014-07-202-10/+10
| | | | | | | | | | | in ctl.conf.5 and fix a couple of contractions. PR: 191984 Submitted by: olgeni MFC after: 1 week Notes: svn path=/head/; revision=268931
* Handle nested exceptions in bhyve.Neel Natu2014-07-193-5/+53
| | | | | | | | | | | | | | | | | | | A nested exception condition arises when a second exception is triggered while delivering the first exception. Most nested exceptions can be handled serially but some are converted into a double fault. If an exception is generated during delivery of a double fault then the virtual machine shuts down as a result of a triple fault. vm_exit_intinfo() is used to record that a VM-exit happened while an event was being delivered through the IDT. If an exception is triggered while handling the VM-exit it will be treated like a nested exception. vm_entry_intinfo() is used by processor-specific code to get the event to be injected into the guest on the next VM-entry. This function is responsible for deciding the disposition of nested exceptions. Notes: svn path=/head/; revision=268889
* r243637 changed the default number of nfsd threads created,Rick Macklem2014-07-191-2/+2
| | | | | | | | | | | but the man page did not reflect this. This is a content change. Reported by: bde MFC after: 2 weeks Notes: svn path=/head/; revision=268866
* Oops, forgot to bump manual date/copyright in r268860.Devin Teske2014-07-181-2/+2
| | | | | | | | | MFC after: 3 days X-MFC-to: stable/10, stable/9, ports X-MFC-with: r268860 Notes: svn path=/head/; revision=268863
* Minor enhancements, bug fixes, and man-page adjustments.Devin Teske2014-07-182-28/+40
| | | | | | | | | | | | | | | | | | | | | | | | | + Make `sysrc -x foo' produce error status if foo is unset. NB: Reported by lme (everything else ``while I'm at it'') + Remove mention of SYSRC_VERBOSE from `sysrc --help' output. NB: False documentation leftover from an ancient precursor. + Make `sysrc -qc foo' work the same as `sysrc -ic foo' when foo is unset NB: For syntax convenience (my fingers know `-q' more than `-i'). + Update description of `-c' flag in help message/manual. + Update description of `-q' flag in help message/manual. + Make `sysrc -vc foo' work as documented in the manual NB: Show message stating whether foo is currently set. + Make `sysrc -vc foo=1' work as documented in the manual NB: Show message stating how value of foo would be changed (if at all). + Remove odd usage of parentheses in `-R dir' section of manual. + Clarify syntax section of manual w/respect to sysctl(8) similarities. + Add new/missing people to the `THANKS TO' section of the manual. Reported by: lme MFC after: 3 days X-MFC-to: stable/10, stable/9, ports Notes: svn path=/head/; revision=268860
* Use a combination of unblock-lan-zones (r268839) and domain-insecureDag-Erling Smørgrav2014-07-181-1/+51
| | | | | | | to fix reverse lookups on networks using private addresses. Notes: svn path=/head/; revision=268840
* Fix "ndp -d hostname".Peter Wemm2014-07-181-1/+1
| | | | Notes: svn path=/head/; revision=268827
* Replace all uses of libncurses and libtermcap with their wide characterBrooks Davis2014-07-179-18/+18
| | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=268804
* Fix ctld crash on startup if target alias is not set.Alexander Motin2014-07-171-2/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=268795
* chown: Fix chown test numberEitan Adler2014-07-171-1/+1
| | | | Notes: svn path=/head/; revision=268793
* Add emulation for legacy x86 task switching mechanism.Neel Natu2014-07-164-7/+926
| | | | | | | | | | FreeBSD/i386 uses task switching to handle double fault exceptions and this change enables that to work. Reported by: glebius Notes: svn path=/head/; revision=268777
* Revert previous revision (r268461) for reasons documented in PR.Devin Teske2014-07-161-1/+1
| | | | | | | | | | | | | | | To use tmux in an rc.d script, use the new-session flag "-d". To use screen in an rc.d script, use the "-dm" flag. If you really need to launch an attached session, manually export TERM=xterm (FreeBSD 9.0 or higher) or export TERM=cons25 for older releases. Reported by: bdrewery Discussed on: src-committers, svn-src-all, svn-src-head PR: bin/191869 Notes: svn path=/head/; revision=268773
* Add support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.Alexander Motin2014-07-161-0/+8
| | | | | | | | | | | | | | | | | | This allows to clone VMs and move them between LUNs inside one storage host without generating extra network traffic to the initiator and back, and without being limited by network bandwidth. LUNs participating in copy operation should have UNIQUE NAA or EUI IDs set. For LUNs without these IDs VMWare will use traditional copy operations. Beware: the above LUN IDs explicitly set to values non-unique from the VM cluster point of view may cause data corruption if wrong LUN is addressed! MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=268767
* When we fail to extract the pkg binaries (for example, / is read-only),Gavin Atkinson2014-07-161-1/+2
| | | | | | | | | give a more helpful error message. MFC after: 1 week Notes: svn path=/head/; revision=268728
* Fix an issue with service(8) where utilities such as screen(1) and tmux(1)Devin Teske2014-07-151-1/+1
| | | | | | | | | | | | | | | would behave differently when utilizing rc-script was invoked manually vs. service(8). The issue being that these utilities require the TERM environ variable to be set and service(8) was not passing it down. Reported by: Michael Dexter <editor@callfortesting.org> PR: bin/191869 Reviewed by: allanjude MFC after: 3 days X-MFC-to: stable/10, stable/9 Notes: svn path=/head/; revision=268641
* Use the blockif CHS routine to create fake CHS values,Peter Grehan2014-07-151-0/+6
| | | | | | | | | | | and then populate them in the identity page. This fixes a divide-by-zero error at probe time with NetBSD. MFC after: 1 week. Notes: svn path=/head/; revision=268639
* Add a call to synthesize a C/H/S value for block emulationsPeter Grehan2014-07-152-0/+51
| | | | | | | | that require it (ahci). The algorithm used is from the VHD specification. Notes: svn path=/head/; revision=268638
* Allow up to 512K for boot code on GPT with BIOS. As pmbr.s says in a comment,Nathan Whitehorn2014-07-111-1/+1
| | | | | | | | | | "545K should be enough for any boot code". This rounds down slightly. Reported by: Matthew Fuller MFC after: 2 weeks Notes: svn path=/head/; revision=268540
* The month's name shall not be abbreviated.Gavin Atkinson2014-07-111-1/+1
| | | | Notes: svn path=/head/; revision=268539
* Reword an awkward option descriptionGavin Atkinson2014-07-101-3/+4
| | | | | | | | | PR: 191726 Reported by: yaneurabeya gmail.com MFC after: 3 days Notes: svn path=/head/; revision=268488
* Fix typos.Sergey Kandaurov2014-07-091-2/+2
| | | | Notes: svn path=/head/; revision=268457
* Add LUN options to specify 64-bit EUI and NAA identifiers.Alexander Motin2014-07-091-1/+5
| | | | Notes: svn path=/head/; revision=268447
* Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.Alexander Motin2014-07-071-0/+4
| | | | Notes: svn path=/head/; revision=268363
* Remove ia64.Marcel Moolenaar2014-07-078-27/+8
| | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* Close race in r268291 between port destruction, delayed by sessionsAlexander Motin2014-07-061-0/+8
| | | | | | | | | | teardown, and new port creation during `service ctld restart`. Close it by returning iSCSI port internal state, that allows to identify dying ports, which should not be counted as existing, from really alive. Notes: svn path=/head/; revision=268328
* Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.Alexander Motin2014-07-063-24/+10
| | | | | | | | | | | | Previously ISID was changed every time, that made impossible correct persistent reservation, because reconnected session was identified as completely new one. Reviewed by: trasz MFC after: 1 week Notes: svn path=/head/; revision=268326
* Pass through iSCSI session ISID from LOGIN request to the CTL frontend.Alexander Motin2014-07-053-0/+6
| | | | | | | | ISID is an important part of initiator transport ID for iSCSI. It is not used now, but should be to properly implement persistent reservation. Notes: svn path=/head/; revision=268302