summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Use snprintf(3) in place of unbounded sprintf(3) (prevent buffer overflow).dteske2014-09-292-78/+97
| | | | | | | | | | | | | | | | | | | | | | | | Use adequately sized buffer for error(s) (512 -> PATH_MAX + 512). Fix the following style(9) nits while here: - distfetch.c uses PATH_MAX while distextract.c uses MAXPATHLEN; standardize on one (PATH_MAX) - Move $FreeBSD$ from comment to __FBSDID() - Sort included headers (alphabetically, sys/* at top) - Add missing header includes (e.g., <stdlib.h> for getenv(3), calloc(3)/malloc(3)/free(3), and atoi(3); <string.h> for strdup(3), strrchr(3), strsep(3), and strcmp(3); <ctype.h> for isspace(3); and <unistd.h> for chdir(2), etc.) - Remove rogue newline at end of distfetch.c - Don't declare variables in if-, while-, or other statement NB: To prevent masking of prior declarations atop function - Perform stack alignment for variable declarations - Add missing function prototype for count_files() in distextract.c - Break out single-line multivariable-declarations NB: Aligning similarly-named variables with one-char difference(s) NB: Minimizes diffs and makes future diffs more clear - Use err(3) family of functions (requires s/int err;/int retval;/g) Reviewed by: nwhitehorn, julian
* Change the /var dataset in the default ZFS layout to have theallanjude2014-09-281-1/+1
| | | | | | | | | | | | ZFS property canmount=off so that /var/db/pkg and other such directories are part of the / dataset, and only /var/mail, /var/log, and /var/crash are excluded from the ZFS boot environment (beadm). PR: 193971 Approved by: jmg MFC after: ASAP Relnotes: yes Sponsored by: ScaleEngine Inc.
* - Cleanups pc98 code.nyan2014-09-281-20/+6
| | | | - Remove unworked formats.
* After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHAREDneel2014-09-271-1/+1
| | | | | | | | for non-anonymous mappings. This gets 'bhyvectl --get-all' working again. Reported by: Anish Gupta (akgupt3@gmail.com)
* Add a line to the post-installation configuration dialog to enable thedes2014-09-261-0/+1
| | | | | | local_unbound service. MFC after: 3 days
* Fix thinko that, with two map entries like shown below, in that order,trasz2014-09-231-1/+11
| | | | | | | | | | | | made automountd(8) mix them up: trying to access the second one would trigger mount for the first one. foo host:/foo foobar host:/foobar PR: 193584 MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Make it more explicitly clear that -t will not change filename.bdrewery2014-09-231-1/+2
| | | | MFC after: 3 days
* Correct display of bhyve SMBIOS UUIDs with dmidecode by bumping the version.grehan2014-09-231-1/+1
| | | | | | | | | | | | | | | | The mixed little/big-endianness of SMBIOS UUIDs was clarified in v2.6 of the SMBIOS spec. dmidecode uses the reported version of SMBIOS to determine the layout and what to byte-swap. bhyve's SMBIOS reported as 2.4 though it implemented the 2.6-style of memory layout. This resulted in dmidecode reporting a different UUID than one passed in via the -U option. Fix by exporting a version of 2.6. Reviewed by: tychon Reported by: julian MFC after: 1 day
* Restructure the MSR handling so it is entirely handled by processor-specificneel2014-09-203-10/+68
| | | | | | | | | | | | | | | | | | | code. There are only a handful of MSRs common between the two so there isn't too much duplicate functionality. The VT-x code has the following types of MSRs: - MSRs that are unconditionally saved/restored on every guest/host context switch (e.g., MSR_GSBASE). - MSRs that are restored to guest values on entry to vmx_run() and saved before returning. This is an optimization for MSRs that are not used in host kernel context (e.g., MSR_KGSBASE). - MSRs that are emulated and every access by the guest causes a trap into the hypervisor (e.g., MSR_IA32_MISC_ENABLE). Reviewed by: grehan
* Style (9) fixes, spaces to tabs.smh2014-09-191-50/+50
| | | | | | | | Fix style issues noticed when I went to MFC r257820 MFC after: 2 days X-MFC-With: r257820 Sponsored by: Multiplay
* Make kernel to update LUN size from the backing storage on configurationmav2014-09-181-1/+2
| | | | | | | | reload also if that size was not specified in the new configuration. Previously it happened only if size was explicitly changed in config. MFC after: 3 days
* lpr: replace setpgrp(2) with setpgid(2).pfg2014-09-181-1/+1
| | | | | | | | setpgid(2) is more portable than setpgrp(2). The BSD variant of setpgrp is a wrapper for setpgid(2) anyways. MFC after: 5 weeks
* Fix incremental builds involving non-root users with read-only source files.will2014-09-181-1/+1
| | | | | | | | | | | Makefiles should not assume that source files can be overwritten. This is the common case for Perforce source trees. This is a followup commit to r211243 in the same vein. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06
* r258695 introduces a sanity check for makefs in order to verify thatdavide2014-09-181-1/+2
| | | | | | | | | | | | | | | | | the minimum image size specified is always less than the maximum image size. If makefs(1) is invoked specifying minimum image size, but not maximum one, the program exits with an error. Example: # sudo -E makefs -M 538968064 -B be /home/davide/disk.img $DESTDIR makefs: `/home/davide/tftproot/mips' minsize of 538968064 rounded up to ffs bsize of 8192 exceeds maxsize 0. Lower bsize, or round the minimum and maximum sizes to bsize. Assert then that minsize < maxsize iff maxsize is specified. This change allows me to build MIPS images using makefs(1) and following what specified in the wiki again. Reviewed by: jmallett, ngie
* Update the bhyve(8) manual to reflect that it is nogjb2014-09-171-2/+2
| | | | | | | | longer considered 'experimental.' Reviewed by: grehan MFC after: 3 days Sponsored by: The FreeBSD Foundation
* Fix two small nits in ctl.conf(5).trasz2014-09-141-2/+3
| | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation
* ZFS support isn't actually experimental anymore, so no need to scarenwhitehorn2014-09-141-1/+1
| | | | people.
* Make the root-on-zfs part of the installer warn a user who booted the ↵allanjude2014-09-141-0/+58
| | | | | | | | | | installer via UEFI that we do not support booting ZFS via UEFI yet PR: 193595 Approved by: nwhitehorn MFC after: 5 days Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D782
* Resolve an ambiguity with the definition of a new auth-groupallanjude2014-09-131-0/+1
| | | | | | | | | Resolve a markup mistake Reviewed by: trasz Approved by: bcr (mentor), wblock (mentor) Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D735
* Rename the choices in the partitioning methods dialog to reflect currentnwhitehorn2014-09-131-5/+5
| | | | | | | reality. In particular, draw a connection between the auto ZFS script and the auto UFS one, since they fulfill similar functions. I'm not sure the auto ZFS code is actually experimental anymore, so it might be worth changing that label still.
* Make the default choice for the chroot shell at the end be "No". This allowsnwhitehorn2014-09-131-1/+2
| | | | just pressing enter repeatedly to successfully install a reasonable system.
* Add the new iscsi(4) man pageallanjude2014-09-131-5/+7
| | | | | | | | | Cross reference it from iscsid(8) and iscsictl(8) Reviewed by: trasz Approved by: bcr (mentor), wblock (mentor) Sponsored by: ScaleEngine Inc. CR: https://reviews.freebsd.org/D741
* Add ZFS support to the bsdinstall partition editor and sade.nwhitehorn2014-09-1313-45/+217
| | | | | Submitted by: Kurt Lidl (original version) MFC after: 6 weeks
* Implement control over command reordering via options and control mode page.mav2014-09-131-0/+7
| | | | | | | It allows to bypass range checks between UNMAP and READ/WRITE commands, which may introduce additional delays while waiting for UNMAP parameters. READ and WRITE commands are always processed in safe order since their range checks are almost free.
* Add "readcache" and "writecache" LUN options to control default behavior.mav2014-09-131-2/+6
| | | | | Default values are "on". Disabling requires backend to support IO_DIRECT and IO_SYNC flags respectively, or some alternatives.
* Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,delphij2014-09-135-0/+29
| | | | | | | | | | | | | | many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. This is a stable/10 candidate for inclusion with 10.1-RELEASE. Submitted by: Wei Hu <weh microsoft com> MFC after: 1 week
* Fix minor syntax errorallanjude2014-09-121-1/+1
| | | | | | Submitted by: bjk Approved by: bcr (mentor) Sponsored by: ScaleEngine Inc.
* Improve markup and language throughout the ctl.conf man pageallanjude2014-09-121-123/+190
| | | | | | Reviewed by: trasz Approved by: bcr (mentor) Sponsored by: ScaleEngine Inc.
* Initialize 'bc_rdonly' to the right value.neel2014-09-111-0/+1
| | | | | | | Note that independent of this change a readonly disk file would still be opened O_RDONLY and protected from writes by the guest. Reviewed by: grehan
* Don't blindly assume the target agreed to transition to Full Feature Phase;trasz2014-09-111-9/+31
| | | | | | | | | if we got a Login Response PDU without the "T" bit set, try again with an empty request. This fixes interoperability with COMSTAR. Reviewed by: mav@ Tested by: mav@ MFC after: 1 week
* Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate callsasomers2014-09-101-1/+4
| | | | | | | | | merge(1), which is part of the RCS package, it must not be installed if WITHOUT_RCS update is set. Otherwise, it will produce confusing errors. CR: https://reviews.freebsd.org/D691 MFC after: 1 week Sponsored by: Spectra Logic
* Fix memory leak, reported by Coverity.mav2014-09-101-0/+1
| | | | CID: 1229996
* Allow vtnet operation without merged rx buffers.grehan2014-09-091-20/+66
| | | | | | | | | | | | | | | NetBSD's virtio-net implementation doesn't negotiate the merged rx-buffers feature. To support this, check to see if the feature was negotiated, and then adjust the operation of the receive path accordingly by using a larger iovec, and a smaller rx header. In addition, ignore writes to the (read-only) status byte. Tested with NetBSD/amd64 5.2.2, 6.1.4 and 7-beta. Reviewed by: neel, tychon Phabric: D745 MFC after: 3 days
* Use keys_add_int() where appropriate. No functional changes.trasz2014-09-091-22/+4
| | | | Sponsored by: The FreeBSD Foundation
* Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAliastrasz2014-09-091-4/+20
| | | | | | | | | when the initiator skips security negotiation. This fixes interoperability with Xtend SAN initiator. PR: 193021 MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Add a callback to be notified about negotiated features.grehan2014-09-095-0/+8
| | | | | | Submitted by: luigi Obtained from: Vincenzo Maffione, Universita` di Pisa MFC after: 3 days
* Fix support for IPv6 nameservers.des2014-09-081-1/+1
| | | | | | PR: 188931 Submitted by: Takefu <takefu@airport.fm> MFC after: 3 days
* Avoid ctld(8) crash on getaddrinfo(3) failure.trasz2014-09-061-9/+7
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Document initiator-portal netmask support.trasz2014-09-051-5/+8
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Turn two errors, which are possible to trigger only by bugs,trasz2014-09-051-7/+3
| | | | | | | | into assertions. Discussed with: mav@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Make it possible to quote names in autofs maps using double quotes.trasz2014-09-051-0/+1
| | | | | | | | | | Note that this is a workaround, not a proper solution. If you know lex well, and want to help - please let me know, I'll explain how it should work. PR: 192968 MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Fix typo.trasz2014-09-051-2/+2
| | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* Fix regression introduced by SVN r270954. Correct way to reset getoptsdteske2014-09-021-2/+2
| | | | | | is to set OPTIND to 1, not unset it (which causes an error). Thanks to: jilles
* Fix a bug where command line arguments could be misprocessed if getopts isdteske2014-09-011-0/+2
| | | | | | | | used prior to f_dialog_init() -- e.g., in a script that sets DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run automaticaly when `dialog.subr' is included. Caused by sub-shell processing of arguments inheriting prior value of $OPTIND, used by getopts. Solved by unsetting OPTIND prior to [re-]processing of positional arguments.
* Add -Wthread-safety to WARNS=6.ed2014-09-011-0/+4
| | | | | | | | | | While there, add a NO_WTHREAD_SAFETY flag that can be used to disable this specific warning flag. Disable it for auditdistd. We can easily patch up auditdistd to have the right annotations to build, but as auditdistd is intended to be portable across other operating systems, it's not worth the effort. Approved by: brueffer@
* Add references to vt(4) to further man-pages.se2014-09-011-6/+31
| | | | MFC after: 3 days
* Fix typo (by -> be).se2014-09-011-1/+1
| | | | MFC after: 3 days
* Make SOCK_RAW sockets to be truly raw, not modifying received and sentglebius2014-09-011-1/+1
| | | | | | | | | | | | | | packets at all. Swapping byte order on SOCK_RAW was actually a bug, an artifact from the BSD network stack, that used to convert a packet to native byte order once it is received by kernel. Other operating systems didn't follow this, and later other BSD descendants fixed this, leaving us alone with the bug. Now it is clear that we should fix the bug. In collaboration with: Olivier Cochard-Labbé <olivier cochard.me> See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc.
* Set the 'inst_length' to '0' early on before any error conditions are detectedneel2014-08-301-2/+16
| | | | | | in the emulation of the task switch. If any exceptions are triggered then the guest %rip should point to instruction that caused the task switch as opposed to the one after it.
* Allow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE ↵bapt2014-08-262-5/+20
| | | | | | | | | env var if set) Phabric: https://reviews.freebsd.org/D412 Reviewed by: bdrewery MFC after: 2 weeks Relnotes: yes
OpenPOWER on IntegriCloud