summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output.trasz2015-02-072-4/+4
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Teach ctld(8) to control non-iSCSI CTL ports.mav2015-02-076-72/+257
| | | | | | | | | | | | | | | | This change introduces new target option "port", that assigns current target to specified CTL port. On config application ctld(8) will apply LUN mapping according to target configuration to specified port and bring the port up. On shutdown cltd(8) will remove the mapping and put the port down. This change allows to configure both iSCSI and FibreChannel targets in the same configuration file in alike way. Kernel side support was added earlier at r278037. MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc.
* When upgrading, install the ELF runtime linkers before libraries.brooks2015-02-061-0/+9
| | | | | | | | | | | This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Sponsored by: DARPA, AFRL Differential Revision: D1790 Reviewed by: cperciva MFC after: 3 days
* Make it possible to set (via ctl.conf(5)) and query (via ctladm islist -v)trasz2015-02-068-11/+106
| | | | | | | | | target iSCSI offload. Add mechanism to query maximum receive data segment size supported by chosen hardware offload module, and use it in ctld(8) to determine the value to advertise to the other side. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Add mount.procfs jail parameter, so procfs can be mounted when a prison'sjamie2015-02-065-1/+44
| | | | | | | | | root is in its fstab. Also fix a typo while I'm at it. PR: 197237 197066 MFC after: 3 days
* Add support for multiple portal groups per target.mav2015-02-067-111/+279
| | | | | | | | | | | This change allows multiple "portal-group" options to be specified per target. Each of them may include new optional auth-group name parameter to override per-target auth parameters for specific portal group. Kernel side support was added earlier at r278161. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* Add a new device control utility for new-bus devices called devctl. Thisjhb2015-02-064-0/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allows the user to request administrative changes to individual devices such as attach or detaching drivers or disabling and re-enabling devices. - Add a new /dev/devctl2 character device which uses ioctls for device requests. The ioctls use a common 'struct devreq' which is somewhat similar to 'struct ifreq'. - The ioctls identify the device to operate on via a string. This string can either by the device's name, or it can be a bus-specific address. (For unattached devices, a bus address is the only way to locate a device.) Bus drivers register an eventhandler to claim unrecognized device names that the driver recognizes as a valid address. Two buses currently support addresses: ACPI recognizes any device in the ACPI namespace via its full path starting with "\" and the PCI bus driver recognizes an address specification of 'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector strings supported by pciconf). - To make it easier to cut and paste, change the PnP location string in the PCI bus driver to output a full PCI selector string rather than 'slot=<slot> function=<func>'. - Add a devctl(3) interface in libdevctl which provides a wrapper around the ioctls and is the preferred interface for other userland code. - Add a devctl(8) program which is a simple wrapper around the requests supported by devctl(3). - Add a device_is_suspended() function to check DF_SUSPENDED. - Add a resource_unset_value() function that can be used to remove a hint from the kernel environment. This is used to clear a hint.<driver>.<unit>.disabled hint when re-enabling a boot-time disabled device. Reviewed by: imp (parts) Requested by: imp (changing PCI location string) Relnotes: yes
* Make "ctladm islist" ignore unknown elements, so the old versiontrasz2015-02-061-2/+6
| | | | | | | | | | continues to work with newer kernel. Other ctladm(8) "*list" subcommands seem to already handle it in a reasonable way. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Expose the constants for internal new-bus device flags to userland. Thejhb2015-02-051-0/+4
| | | | | | flag value is already exposed via dv_flags, just not the meaning of the flags themselves. Use these constants to annotate devices that are disabled or suspended in devinfo output.
* Fix two clang 3.6.0 warnings in usr.sbin/syslogd:dim2015-02-051-4/+2
| | | | | | | | | | | | | | | | usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~~~~~~~~~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~~~~~~~~~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1716
* The connection_new() routine was taking an absurd number of parameters; fix it.trasz2015-02-051-15/+7
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Make it possible to set (via iscsi.conf(5)) and query (via iscsictl -v)trasz2015-02-053-5/+13
| | | | | | | | | initiator iSCSI offload. Pass maximum data segment size supported by chosen offload module to iscsid(8), and make iscsid(8) not try to negotiate anything larger than that. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Add the following options to enable/disable several features in the base systemngie2015-02-041-5/+17
| | | | | | | | | | | | | | | WITHOUT_BOOTPARAMD - bootparamd WITHOUT_BOOTPD - bootpd WITHOUT_FINGER - finger, fingerd WITHOUT_FTP - ftp, ftpd WITHOUT_INETD - inetd WITHOUT_RBOOTD - rbootd WITHOUT_TCP_WRAPPERS - tcpd, et al WITHOUT_TFTP - tftp, tftp-server WITHOUT_TIMED - timed MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Conditionalize building radius support into libpam, ppp, etc viangie2015-02-041-0/+3
| | | | | | | MK_RADIUS_SUPPORT MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Test the return of fetchParseURL(3)bapt2015-02-041-1/+5
| | | | | CID: 1125811 MFC after: 1 week
* Plug resources leakbapt2015-02-041-4/+10
| | | | | | | CID: 1125813 CID: 1125807 CID: 1125808 MFC after: 1 week
* Bring some more order into iSCSI portal group tags support.mav2015-02-034-10/+17
| | | | | | | | While ctld(8) still does not allow multiple portal groups per target to be configured, kernel should now be able to handle it. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* CTL LUN mapping rewrite.mav2015-02-017-312/+466
| | | | | | | | | | | | | | | | | | | | | Replace iSCSI-specific LUN mapping mechanism with new one, working for any ports. By default all ports are created without LUN mapping, exposing all CTL LUNs as before. But, if needed, LUN mapping can be manually set on per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2). The next step will be to teach ctld to work with FibreChannel ports also. Respecting additional flexibility of the new mechanism, ctl.conf now allows alternative syntax for LUN definition. LUNs can now be defined in global context, and then referenced from targets by unique name, as needed. It allows same LUN to be exposed several times via multiple targets. While there, increase limit for LUNs per target in ctld from 256 to 1024. Some initiators do not support LUNs above 255, but that is not our problem. Discussed with: trasz MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc.
* Use MBR by default on BIOS systems. An increasing number of motherboardsnwhitehorn2015-01-301-1/+4
| | | | | | | assume that GPT means UEFI boot, resulting in the installation of uninstallable systems. This needs a little more work before MFC, in particular based on disk size (> 2 TB + BIOS + MBR is not workable). That will come soon.
* Add -s option to config.rodrigc2015-01-292-3/+24
| | | | | | | | | | | | This option allows for specifying the directory to use as the location for kernel source files. This option was ported from NetBSD. GitHub Pull Request: https://github.com/freebsd/freebsd/pull/18 Submitted by: Steve Kiernan <stevek@juniper.net>, Simon Gerraty <sjg@juniper.net> Obtained from: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D1722 Relnotes: yes
* Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:dim2015-01-281-1/+1
| | | | | | | | | | | | | | usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] key.data = (void*)&VERSION_KEY; ^ usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual] key.data = (void*)&VERSION_KEY; ^ Replace the VERSION_KEY define with a writable char array, so no const qualifier needs to be dropped anymore. Submitted by: rdivacky
* Fix multiple instances of the following clang 3.6.0 warning in ppp:dim2015-01-285-8/+8
| | | | | | | | | | | | usr.sbin/ppp/command.c:2054:74: error: address of array 'arg->bundle->radius.cfg.file' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) { ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ In all cases, the file field of struct radius is a char array, but the intent was to check whether the string is empty, so add an indirection to achieve that. Use a similar approach for the sockname field of struct server.
* Fix the following clang 3.6.0 warnings in pciconf:dim2015-01-281-2/+2
| | | | | | | | | | | | | | usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? p->pd_name : ~~~^~~~~~~ ~~ usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (p->pd_name && *p->pd_name) ? (int)p->pd_unit : ~~~^~~~~~~ ~~ The pd_name field of struct pci_conf is an array, so it can never be null. Remove the unnecessary check.
* Add allow.mount.fdescfs jail flag.jamie2015-01-281-2/+10
| | | | | | PR: 192951 Submitted by: ruben@verweg.com MFC after: 3 days
* Check for invalid length or more than max length for the interpreter, insteadsbruno2015-01-281-1/+1
| | | | | | | | of the validity of the string pointer holding the interpreter. Submitted by: sson Reviewed by: dim MFC after: 3 days
* When there are no automounted filesystems, autounmountd(8) should waittrasz2015-01-281-13/+23
| | | | | | | for filesystem event, instead of looping on a timeout. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix yet another coverty warning (missing io is NULL check) and in examining thatrrs2015-01-271-2/+8
| | | | | warning I see yet another issue where we should be pclosing the io in the event of the error and its a command (not fclose only).
* Revert r277652bapt2015-01-265-50/+3
| | | | | | uid and gid are never and should never be negative. The pw(8) manpage clearly states the -u and -g arguments are for uids/gids, hence using negative values is abusing a bug in former versions of pw(8)
* Add MK_AUTOFS knob for building and installing autofs(4), et alngie2015-01-261-1/+4
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Add MK_BHYVE knob for building and installing bhyve(4), et alngie2015-01-261-0/+2
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Add MK_BSDINSTALL knob for building and installing bsdinstallngie2015-01-251-1/+4
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernelngie2015-01-251-1/+4
| | | | | | | modules, etc MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Allow negative numbers in -u and -g optionsbapt2015-01-245-3/+50
| | | | | PR: 196514 MFC after: 1 week
* Bump config(8) minor version for r277567.will2015-01-241-1/+1
| | | | | | | | | Config files built using this version that take advantage of the bugfix won't be buildable using older config(8). Submitted by: imp MFC after: 1 week MFC with: 277567
* Allow lists for "nooption" and "nooptions" keywords.will2015-01-231-1/+11
| | | | | | | | | | | | | | | | usr.sbin/config/config.y According to config(5), the "device", "devices", "nodevice", "nodevices", "option", "options", "nooption", and "nooptions" keywords can all take a comma-separated list of values. However, the yacc code did not allow lists for "nooption" and "nooptions", only single values. This commit fixes the yacc code to allow comma separated values for all the above keywords. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1095296 on 2014/10/07
* Print transfer times for read, write, & overall independently.will2015-01-231-11/+21
| | | | | | | | | | | | | | Round up calculated values for iops and average time per io to avoid a shifting display if there are 1000+ (or even 10000+) iops, or if an average time per io column is 1000+ ms. Reviewed by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1089947 on 2014/09/26 1093625 on 2014/09/29 1093650 on 2014/09/29 1095662 on 2014/10/09
* Fix minor errors found by coverity. Thanks Gleb forrrs2015-01-211-1/+4
| | | | the pointers to the email!
* When mountd is creating sockets, it iterates over all addresses specifiedrstone2015-01-193-3/+4
| | | | | | | | | | | | | | | | | | | | | in the "hosts" array and eventually looks up the network address with getaddrinfo(). At one point it checks for a numeric address and if it sees one, it sets a hint parameter to force getaddrinfo to interpret the host as a numeric address. However that hint is not cleared for subsequent iterations of the loop and if any hosts seen after this point are host names, getaddrinfo will fail on the name. The result of this bug is that you cannot pass a host name to the -h flag. Unfortunately, the first iteration will either process ::1 or 127.0.0.1, so the flag is set on the first iteration and all host names will fail to be processed. The same bug applies to rpc.lockd and rpc.statd, so fix them too. Differential Revision: https://reviews.freebsd.org/D1507 Reported by: Dylan Martin MFC after: 1 week Sponsored by: Sandvine Inc.
* Fix bsdinstall when working with geli boot diskssmh2015-01-181-0/+3
| | | | | | | | PR: 196790 Differential Revision: https://reviews.freebsd.org/D566 Submitted by: Michael Gmelin <grembo@FreeBSD.org> MFC after: 2 weeks Sponsored by: Multiplay
* Simplify instruction restart logic in bhyve.neel2015-01-185-55/+36
| | | | | | | | | | | | | | | | | | | | | | Keep track of the next instruction to be executed by the vcpu as 'nextrip'. As a result the VM_RUN ioctl no longer takes the %rip where a vcpu should start execution. Also, instruction restart happens implicitly via 'vm_inject_exception()' or explicitly via 'vm_restart_instruction()'. The APIs behave identically in both kernel and userspace contexts. The main beneficiary is the instruction emulation code that executes in both contexts. bhyve(8) VM exit handlers now treat 'vmexit->rip' and 'vmexit->inst_length' as readonly: - Restarting an instruction is now done by calling 'vm_restart_instruction()' as opposed to setting 'vmexit->inst_length' to 0 (e.g. emulate_inout()) - Resuming vcpu at an arbitrary %rip is now done by setting VM_REG_GUEST_RIP as opposed to changing 'vmexit->rip' (e.g. vmexit_task_switch()) Differential Revision: https://reviews.freebsd.org/D1526 Reviewed by: grehan MFC after: 2 weeks
* Add a ${CP} alias for copying files in the build.will2015-01-161-1/+1
| | | | | | | | | | | | | | Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic
* crunchide: Correct 64-bit section header offsetemaste2015-01-161-1/+2
| | | | | | | | | | For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). Differential Revision: https://reviews.freebsd.org/D1543 MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Plug mutex leak.glebius2015-01-161-1/+3
| | | | | MFC after: 1 week Sponsored by: Nginx, Inc.
* Instead of iterating through all properties looking for a match, if askednwhitehorn2015-01-161-51/+61
| | | | | | for a specific property, look it up directly. MFC after: 1 week
* Reserve and ignore the a new module metadata type MDT_PNP_INFO forimp2015-01-151-0/+4
| | | | | | | | | | associating an optional PNP hint table with this module. In the future, when these are added, these changes will silently ignore the new type they would otherwise warn about. It will always be safe to ignore this data. Get this into the builds today for some future proofing. MFC After: 3 days
* Update the hwpmc driver to have the new type HASWELL_XEON. Alsorrs2015-01-146-0/+3277
| | | | | | | | | | | | | | | go back through HASWELL, IVY_BRIDGE, IVY_BRIDGE_XEON and SANDY_BRIDGE to straighten out all the missing PMCs. We also add a new pmc tool pmcstudy, this allows one to run the various formulas from the documents "Using Intel Vtune Amplifier XE on XXX Generation platforms" for IB/SB and Haswell. The tool also allows one to postulate your own formulas with any of the various PMC's. At some point I will enahance this to work with Brendan Gregg's flame-graphs so we can flamegraph various PMC interactions. Note the manual page also needs some work (lots of work) but gnn has committed to help me with that ;-) Reviewed by: gnn MFC after:1 month Sponsored by: Netflix Inc.
* Improve wording.trasz2015-01-141-4/+4
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix detection of ext2/ext3 filesystems that lack labels.trasz2015-01-131-6/+0
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf.brueffer2015-01-121-1/+1
| | | | | | | | The error exists in the NetBSD upstream version as well and will be reported back. PR: 196598 Submitted by: Dan McGregor MFC after: 1 week
* Improve documentation for autofs variables and executable maps;trasz2015-01-091-3/+58
| | | | | | | | also some markup fixes. Differential Revision: https://reviews.freebsd.org/D1447 MFC after: 1 month Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud