aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that the sector size is a multiple of 4096 to avoid creatingDag-Erling Smørgrav2016-08-151-6/+20
| | | | | | | | | | unaligned partitions when the actual sector size is hidden from us. PR: 211361 MFC after: 3 days Notes: svn path=/head/; revision=304142
* o Move tmpstr varibale initialization out of assert(3) call.Maxim Konovalov2016-08-121-4/+4
| | | | | | | | | | This fixes acpidump(8) compiled with "WITHOUT_ASSERT_DEBUG=yes" that removes assert(3)'s from the code. Submitted by: Alexander Nedotsukov Notes: svn path=/head/; revision=304000
* ancontrol(8): replace comma with semicolon when pertinent.Pedro F. Giffuni2016-08-091-2/+2
| | | | | | | | | | | | | Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. Detected with devel/coccinelle following a hint from DragonFlyBSD. MFC after: 1 month Notes: svn path=/head/; revision=303894
* Write kern.randompid to /etc/sysctl.confSteven Kreuzer2016-08-091-2/+3
| | | | | | | | | | | | PR: 211471 Reported by: survo@protonmail.com Reviewed by: robak@ Approved by: allanjude@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7440 Notes: svn path=/head/; revision=303877
* Fix some logic in PCIe HotPlug; display EI statusEric van Gyzen2016-08-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The interpretation of the Electromechanical Interlock Status was inverted, so we disengaged the EI if a card was inserted. Fix it to engage the EI if a card is inserted. When displaying the slot capabilites/status with pciconf: - We inverted the sense of the Power Controller Control bit, saying the power was off when it was really on (according to this bit). Fix that. - Display the status of the Electromechanical Interlock: EI(engaged) EI(disengaged) Reviewed by: jhb MFC after: 3 days Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D7426 Notes: svn path=/head/; revision=303788
* always install etcupdateBaptiste Daroussin2016-08-051-1/+1
| | | | | | | | Now that etcupdate does not depend on rcs anymore there is no need to conditionnally install it Notes: svn path=/head/; revision=303785
* etcupdate: directly use diff3(1) instead of merge(1)Baptiste Daroussin2016-08-051-7/+9
| | | | | | | | | | | | | During the last attempt to rmeove GNU rcs, 2 blockers were spotted: We need an ident(1) and etcupdate(8) uses merge(1). Now nothing should prevent to remove rcs from base Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D7401 Notes: svn path=/head/; revision=303784
* kgzip.8: note that it is deprecated and clarify BUGS sectionEd Maste2016-08-021-2/+15
| | | | | | | | | | | | kgzip is only useful on i386 and has a number of other limitations. We're better served by officially deprecating it and encouraging users to use loader(8) instead. Reviewed by: dteske, wblock Differential Revision: https://reviews.freebsd.org/D7098 Notes: svn path=/head/; revision=303682
* Fix non-functional bsdinstall services dialog.Dimitry Andric2016-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The most recent version of bsdinstall does not seem to respect any of the checkboxes in the "Choose the services you would like to be started at boot" dialog. None of the chosen services end up in the rc.conf file that is installed onto the target system. This is caused by the bsdinstall/scripts/hardening script, which implements the new hardening options dialog. The script starts by overwriting the previously written rc.conf.services file: echo -n > $BSDINSTALL_TMPETC/rc.conf.services which is obviously incorrect. It should clear out rc.conf.hardening instead. Reviewed by: allanjude PR: 211506 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7387 Notes: svn path=/head/; revision=303631
* Fix up setgrent(3) to have a POSIX-compliant prototype.Ed Schouten2016-07-312-12/+3
| | | | | | | | | | | | | | | | | | | | | | Just like with freelocale(3), I haven't been able to find any piece of code that actually makes use of this function's return value, both in base and in ports. The reason for this is that FreeBSD seems to be the only operating system to have such a prototype. This is why I'm deciding to not use symbol versioning for this. It does seem that the pw(8) utility depends on the function's typing and already had a switch in place to toggle between the FreeBSD and POSIX variant of this function. Clean this up by always expecting the POSIX variant. There is also a single port that has a couple of local declarations of setgrent(3) that need to be patched up. This is in the process of being fixed. PR: 211394 (exp-run) Notes: svn path=/head/; revision=303580
* Rename devname to udevname after including stdlib.h in r303445Bjoern A. Zeeb2016-07-301-9/+9
| | | | | | | | | as gcc trips over the devname(3) and reports 'shadows a global declaration'. This should unbreak gcc based world builds. Notes: svn path=/head/; revision=303560
* Remove usage of _WITH_GETLINE from usr.sbinBaptiste Daroussin2016-07-305-5/+0
| | | | Notes: svn path=/head/; revision=303527
* Clean up use of basename() and dirname().Ed Schouten2016-07-281-11/+17
| | | | | | | | | | Pull copies of the input pathname string before calling basename() and dirname() to make this comply to POSIX. Free these copies at the end of this function. While there, remove the duplication of the 's' -> 'logfname' string. There is no need for this. Notes: svn path=/head/; revision=303449
* Call basename() and dirname() in the POSIXly correct way.Ed Schouten2016-07-281-5/+17
| | | | | | | | Pull copies of the input string, as these functions are allowed to modify them. Free the copies after creating the new pathname string. Notes: svn path=/head/; revision=303445
* Fix non-amd64 build from r292043 after reconnecting in r303410.Bryan Drewery2016-07-271-5/+1
| | | | | | | | | MFC after: 3 days X-MFC-With: r303410 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303419
* Reconnect pmcstudy, lost in r291021Bryan Drewery2016-07-271-0/+1
| | | | | | | | | Reported by: pluknet MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303410
* - Change the fbuf "vga" parameter to "vga=on|io|off".Peter Grehan2016-07-271-15/+33
| | | | | | | | | | | | | | | | | | | | "io" is the default, and allows VGA i/o registers to be accessed. This is required by Win7/2k8 graphics guests that use a combination of BIOS int10 and UEFI. "off" disables all VGA i/o and mem accesses. "on" is not yet hooked up, but will enable full VGA rendering. OpenBSD/UEFI >= 5.9 graphics guests can be booted using "vga=off" - Allow "rfb" to be used instead of "tcp" for the fbuf VNC description. "tcp" will be removed at a future point and is kept as an alias. Discussed with: Leon Dang MFC after: 3 days Notes: svn path=/head/; revision=303352
* Catch another case where an XHCI interrupt was beingPeter Grehan2016-07-261-1/+2
| | | | | | | | | | | | | injected without state being set up. This fixes a core dump when dropping to the UEFI prompt with graphics enabled and moving the mouse around. Discussed with: Leon Dang MFC after: 3 days Notes: svn path=/head/; revision=303349
* Do not try to delete the home of the user if is is not a directory for exampleBaptiste Daroussin2016-07-232-0/+12
| | | | | | | | | | | | "/dev/null" PR: 211195 Submitted by: rday <ryan@ryanday.net> Reported by: eniorm <eniorm@gmail.com> MFC after: 1 day Notes: svn path=/head/; revision=303217
* Move chown tests to proper pathBryan Drewery2016-07-231-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303212
* ctld(8): Fix MaxBurstLength negotiation.Navdeep Parhar2016-07-221-1/+1
| | | | | | | | | | | | The target must reply with the selected value of MaxBurstSize instead of just echoing back the initiator's offered value. Reviewed by: mav@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7278 Notes: svn path=/head/; revision=303199
* Add documentation for "ctld -u", the UCL configuration file format.Edward Tomasz Napierala2016-07-212-2/+96
| | | | | | | | | | Submitted by: jceel@ Reviewed by: wblock@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7222 Notes: svn path=/head/; revision=303132
* Update crashinfo to work with newer gdb from ports.John Baldwin2016-07-201-8/+27
| | | | | | | | | | | | | | | | If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D7218 Notes: svn path=/head/; revision=303109
* Fix camdd for host-aware and host-managed SMR disks.Alan Somers2016-07-201-0/+1
| | | | | | | | | | | This should've gone in as part of r300207 Reviewed by: ken MFC after: 3 days Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=303091
* makefs: sync NetBSD IDs with upstream for changes that we already haveEd Maste2016-07-195-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | May 22 21:51:39 2011 +0000 (christos): From Nathan Whitehorn (nwhitehorn at freebsd dot org): Add code to generate bootable ISOs on Powermac and CHRP systems. Synthesize some partition maps (APM and MBR, respectively) pointing to (a) the whole disk, and (b) relevant El Torito boot images that have been added by other code. These partition maps are a little bit funny looking, but they seem to work. FreeBSD has been using this successfully in their release generation on powerpc, as well as generating all non-SPARC install media. SPARC support could probably be added as an extension of this patch. makefs.8 1.33 Tue Aug 23 17:09:11 2011 +0000 (christos): PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2 filenames (buffer overflow) makefs does not properly verify the maximum filename length in the special "." case for both ISO level 1 and ISO level 2 filename conversion. This creates broken images or causes a buffer overflow (ISO level 2). ISO level 1: If a filename contains only dots or up to 8 characters followed by dots the 8+3 limit check doesn't work. ISO level 2: If a filename contains a dot in the first 30 characters and a dot on the 30th character, the length limit check doesn't work and the buffer is overflowed. $ mkdir level1 $ touch level1/12345............ $ makefs -t cd9660 -o isolevel=1 test.iso level1 $ mkdir level2 $ touch level2/1234567890.2345678901234567.....34567890123456789012345 $ makefs -t cd9660 -o isolevel=2 test.iso level2 cd9660.c 1.32 Sun Oct 9 21:33:43 2011 +0000 (christos): add support for setting the ufs label. (Nathan Whitehorn) ffs.c 1.45 ffs.h 1.2 mkfs.c 1.22 makefs.8 1.37 Obtained from: NetBSD Notes: svn path=/head/; revision=303038
* makefs: reorder 'usage' alphabeticallyEd Maste2016-07-192-5/+6
| | | | | | | | | | | | | | | | | | | | From NetBSD, Mon Aug 15 14:45:01 2011 +0000 (wiz) Re-order `usage' alphabetically; rename option arguments in the manpage's `SYNOPSIS' section to match those from `usage' (not the other way around; the `usage'-line (and other parts of makefs.c) contain the correct names); minor punctuation improvements. From Snader_LB. makefs.8 1.36 makefs.c 1.30 Obtained from: NetBSD Notes: svn path=/head/; revision=303036
* Add missing flags from acpidump. These are defined in the header, but notAndrew Turner2016-07-191-0/+3
| | | | | | | | | | | | printed. The HW_REDUCED flag is useful as it should be set on arm64 to comply with the ARM Server Base Boot Requirements. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=303026
* Disallow interrupt requests on disabled endpoints.Peter Grehan2016-07-171-0/+10
| | | | | | | | Submitted by: Leon Dang MFC after: 3 days Notes: svn path=/head/; revision=302972
* Fix NCQ TRIM emulation.Alexander Motin2016-07-171-2/+10
| | | | | | | When this code was written, there was no guests using it to test. Notes: svn path=/head/; revision=302957
* A failed installation once restarted will often error outAllan Jude2016-07-161-0/+9
| | | | | | | | | | | | | | | If an encrypted install is attempted and fails for any reason, the disk cannot be erased by the installer because the partition is in use by GELI At the start of the installation process, all ZFS pools are exported and all GELI instances are detached, to allow a restarted install to proceed PR: 210814 Reported by: jonathan MFC after: 10 days Notes: svn path=/head/; revision=302941
* Fix encrypted MBR installAllan Jude2016-07-161-1/+2
| | | | | | | | | | | | The pools are exported and reimported in order to write the bootcode This causes an error when the bootpool is later mounted by common code The bootpool is now imported with the -N flag to prevent mounting Reported by: Michael Dexter MFC after: 5 days Notes: svn path=/head/; revision=302940
* Revert unwanted change leaked into r302932.Alexander Motin2016-07-161-1/+0
| | | | Notes: svn path=/head/; revision=302933
* Increase I82545_MAX_TXSEGS from 20 to 64 and add checks for it.Alexander Motin2016-07-162-33/+31
| | | | | | | | | There seems no hard limit on number of segments per packet in the chip, and 20 appeared insufficient. Hope 64 will be enough, but if not -- add check to report that and drop the packet instead of corrupting stack. Notes: svn path=/head/; revision=302932
* Add new System Hardening menu and options to bsdinstall.Bartek Rutkowski2016-07-154-1/+89
| | | | | | | | | | | | | | | | | This patch add new 'hardening' file responsible for new bsdinstall 'System Hardening' menu allowing users to set some sane and carefully picked system security options (like random process id's, hiding other users/groups processes and others). All options are OFF by default in this patch due to POLA principle with intention to turn change some of them to ON by default in future. Reviewed by: adrian, allanjude, bdrewery, nwhitehorn Approved by: adrian, allanjude MFC after: 7 days Notes: svn path=/head/; revision=302897
* Fix up the order in which jail creation processes are run, to preserveJamie Gritton2016-07-143-6/+23
| | | | | | | | | | the config file's order in the non-parallel-start case. PR: 209112 MFC after: 3 days Notes: svn path=/head/; revision=302856
* Make PCI interupts allocation static when using bootrom (UEFI).Alexander Motin2016-07-145-13/+28
| | | | | | | | | This makes factual interrupt routing match one shipped with UEFI firmware. With old firmware this make legacy interrupts work reliable for functions 0 of PCI slots 3-6. Updated UEFI image fixes problem completely. Notes: svn path=/head/; revision=302850
* Make the new 'set date and time' dialog default to skipAllan Jude2016-07-141-0/+2
| | | | | | | | X-MFC-With: 302790 Requested by: nwhitehorn Notes: svn path=/head/; revision=302795
* bsdinstall: Prompt user to set the date and time after selecting timezoneAllan Jude2016-07-131-0/+36
| | | | | | | | | | | | Not having the correct date and time makes many PKI based things not work In 10 and 11, it can mean that Unbound, ntpd, and sshd won't start Submitted by: des (original patch) MFC after: 7 days Notes: svn path=/head/; revision=302790
* Fix the type used to hold the value returned from getopt. On arm64 char isAndrew Turner2016-07-131-1/+2
| | | | | | | | | | | unsigned so will never be -1. Obtained from: ABT Systems Ltd MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=302788
* pw should sanitize the argument of -w.Alan Somers2016-07-137-15/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, it will silently disable the login for the selected account if the argument is unrecognizable. usr.sbin/pw/pw.h usr.sbin/pw/pw_conf.c usr.sbin/pw/pw_user.c Use separate rules to validate boolean parameters and passwd parameters. Error out if a password parameter cannot be parsed. usr.sbin/pw/tests/Makefile usr.sbin/pw/tests/crypt.c usr.sbin/pw/tests/pw_useradd.sh usr.sbin/pw/tests/pw_usermod.sh Add tests for the validation. Also, enhance existing password-related tests to actually validate that the correct hash is written to master.passwd. Reviewed by: bapt MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6840 Notes: svn path=/head/; revision=302778
* META_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)Bryan Drewery2016-07-122-2/+2
| | | | | | | | | | | | | New .meta files will be created without filemon data, but any future build that wants filemon data will force a rebuild due to the missing data due to use of bmake's .MAKE.MODE=missing-filemon=yes feature. Reported by: np Sponsored by: EMC / Isilon Storage Division MFC after: 3 days Notes: svn path=/head/; revision=302674
* Make unknown register reads predictable.Alexander Motin2016-07-121-0/+1
| | | | | | | | Reported by: Coverity CID: 1357525 Notes: svn path=/head/; revision=302668
* Add missing breaks in I/O BAR read/write.Alexander Motin2016-07-121-0/+2
| | | | | | | | | | This could be important if any guest actually used those registers. Reported by: Coverity CID: 1357519, 1357520 Notes: svn path=/head/; revision=302666
* Implement right shift/ctl, and convert the VNC/xorg scancodePeter Grehan2016-07-111-2/+8
| | | | | | | | | | of 0xff03 into right-alt. Reported by: lme@ MFC after: 1 week Notes: svn path=/head/; revision=302546
* Do not allow whitespace in macro names.Marcelo Araujo2016-07-111-0/+8
| | | | | | | Obtained from: OpenBSD (r1.19). Notes: svn path=/head/; revision=302535
* Allow - in distribution names. This is needed for freebsd-update to workXin LI2016-07-111-1/+1
| | | | | | | | | | | | | with 11.0+, where the debugging symbols use a new naming scheme for release distribution files. Errata candidate. Approved by: cperciva Differential Revision: https://reviews.freebsd.org/D7170 Notes: svn path=/head/; revision=302534
* Add emulation for Intel e1000 (e82545) network adapter.Alexander Motin2016-07-093-1/+2378
| | | | | | | | | | | The code was successfully tested with FreeBSD, Linux, Solaris and Windows guests. This interface is predictably slower (about 2x) then virtio-net, but it is very helpful for guests not supporting virtio-net by default. Thanks to Jeremiah Lott and Peter Grehan for doing original heavy lifting. Notes: svn path=/head/; revision=302504
* Fix ctld(8) to not exit when reloading configuration with invalidEdward Tomasz Napierala2016-07-091-1/+1
| | | | | | | | | initiator-portal clause. MFC after: 3 days Notes: svn path=/head/; revision=302503
* Add emulation for multiple (up to 16) MSI vectors for AHCI.Alexander Motin2016-07-082-41/+99
| | | | | | | | | | It was useless before, but may improve performance now if multiple devices are configured and guest supports this feature. Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=302460
* Allow AHCI controller to support up to 32 arbitrary devices.Alexander Motin2016-07-082-58/+89
| | | | | | | | | | | While old syntax is still supported, new syntax looks like this: -s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=302459