summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Make additional parts of sys/geom/eli more usable in userspaceallanjude2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | The upcoming GELI support in the loader reuses parts of this code Some ifdefs are added, and some code is moved outside of existing ifdefs The HMAC parts of GELI are broken out into their own file, to separate them from the kernel crypto/openssl dependant parts that are replaced in the boot code. Passed the GELI regression suite (tools/regression/geom/eli) Files=20 Tests=14996 Result: PASS Reviewed by: pjd, delphij MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4699
* Fix use of uninitialised Nflagsmh2015-12-301-1/+1
| | | | | | | | | | Initialise Nflag to 0 preventing use of uninitialised value. Reported by: uqs MFC after: 1 week X-MFC-With: r292266 Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4449
* Fix type mismatches for malloc(3) and Co.uqs2015-12-292-2/+2
| | | | | | Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722
* Add SFF-8024 Extended Specification Compliancemelifaro2015-12-281-4/+44
| | | | | | Submitted by: markb_mellanox.com MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4666
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.callanjude2015-12-276-7/+33
| | | | | | | | | | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation Extend sbin/md5 to create sha384(1) Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h} Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929
* Reduce overlinkingbapt2015-12-241-1/+1
| | | | ifconfig does not need libbsdxml and libsbuf only lib80211 needs it
* Fix "mount -a" for NFS and ZFS filesystems with shared mountpointsasomers2015-12-211-1/+9
| | | | | | | | | | | | | | | | | sbin/mount.c Check whether an fstab entry has the same fstype as a mounted filesystem before declaring it to be mounted. This will allow NFS filesystems that share a mountpoint with a local filesystem to be automatically mounted at boot. This is not such an unusual situation. For example, if somebody uses the standard installer with a ZFS root, he'll get a /usr/home filesystem, even though he may choose to mount /usr/home over NFS. Reviewed by: trasz MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4556
* Add flag to disable inital reboot(8) userland syncsmh2015-12-152-7/+23
| | | | | | | | | | | | | | | Add -N flag to reboot(8) which bypasses the userland sync(2) during reboot(8) while still allow the kernel sync during the reboot(2) syscall to occur. An example use of this is when rebooting with disconnected iSCSI sessions which would otherwise cause the reboot to hang on BIOs that will never complete. Reviewed by: bjk MFC after: 2 weeks Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4449
* Remove a note about damaged PMBR. Now GPT will be detected automaticallyae2015-12-101-11/+1
| | | | | | with such corruption. MFC after: 1 month
* Don't leak rsector/sector in mp_label(..)ngie2015-12-101-5/+6
| | | | | | | | | | Use calloc instead of malloc + memset(.., 0, ..) when allocating sector Differential Revision: https://reviews.freebsd.org/D4450 MFC after: 1 week Reported by: cppcheck Reviewed by: mav Sponsored by: EMC / Isilon Storage Division
* Add -t option to display field types.araujo2015-12-102-12/+30
| | | | | | | | PR: bin/203918 Submitted by: ota <ota@j.email.ne.jp> Reviewed by: cem Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D4451
* Increase devd's client socket buffer size to 256KB. This is not as large asasomers2015-12-091-6/+17
| | | | | | | | | | it looks, because we'll hit the sockbuf's mbuf limit long before hitting its data limit. A 256KB data limit allows creating a ZFS pool on about 450 drives without overflowing the client socket buffers. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4476
* Call va_end on ap when vsnprintf fails in run_cmd(..) to clean upngie2015-12-091-0/+1
| | | | | | | | the variable state MFC after: 1 week Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division
* Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the endngie2015-12-061-40/+47
| | | | | | | | | | | of the function Differential Revision: https://reviews.freebsd.org/D4405 MFC after: 1 week PR: 204943 Reviewed by: emaste, jilles Reported by: David Binderman <dcb314@hotmail.com> Sponsored by: EMC / Isilon Storage Division
* Fix LDADD/DPADD that should be LIBADD.bdrewery2015-12-041-2/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* For INTERNALLIB always add in the corresponding _DP_ and use LIBADD inbdrewery2015-12-041-0/+2
| | | | | | | | | the real build file. This lessens the need to define DPADD_<lib> and LDADD_<lib> to just very special cases. Sponsored by: EMC / Isilon Storage Division
* META MODE: Connect MK_NAND directories.bdrewery2015-12-022-0/+40
| | | | Sponsored by: EMC / Isilon Storage Division
* Don't add LIBADD=ipf to libipf itself.bdrewery2015-12-011-0/+2
| | | | | | | This had no real impact since libipf is a static INTERNALLIB. It does conflict with an assertion I am adding for LIBADD though. Sponsored by: EMC / Isilon Storage Division
* Add more text to explain --libxo flag.rodrigc2015-12-011-1/+11
|
* META MODE: Update dependencies with 'the-lot' and add missing directories.bdrewery2015-12-013-0/+26
| | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division
* Update dependencies after r291406 added libelf to libkvm.bdrewery2015-12-0110-0/+10
| | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division
* Convert ifconfig to use lib80211.adrian2015-11-304-864/+11
| | | | | | * remove regdomain.[ch] - it's now part of lib80211. * convert ifieee80211.c to use the ioctl routines in lib80211 and implement the "error? exit" wrapper behaviour the callers expect.
* Use netbsd usage() implementation in newfs_msdosemaste2015-11-271-27/+14
| | | | | | | In r289629 newfs_msdos option descriptions are available in mkfs_msdos.h. Obtained from: NetBSD
* mkfs_msdos: sync with NetBSDemaste2015-11-271-3/+8
| | | | | | Add a sanity test and clean up whitespace. Obtained from: NetBSD
* [ifconfig] handle IBSS mediatype correctly.adrian2015-11-261-0/+2
| | | | | | Right now net80211 is configured as type IBSS but then treats it as mediatype ADHOC. This doesn't change that; it just correctly handles being given a mediatype of IBSS.
* Remove redundant DPSRCS which were already in SRCS.bdrewery2015-11-255-9/+0
| | | | | | | DPSRCS already contains all of SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* newfs_msdos: rework error handling for eventual use in makefsemaste2015-11-232-98/+191
| | | | | | | | Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation
* Update $NetBSD$ IDemaste2015-11-231-1/+1
| | | | | | NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the license block, which had already been done in the source I imported in r289629.
* Fix dumpon compatibility with dumpdev kenvsmh2015-11-231-4/+19
| | | | | | | | The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to also support this which is required after r288153. MFC after: 1 week Sponsored by: Multiplay
* Convert to SUBDIR.yes format.bdrewery2015-11-181-60/+20
| | | | | | Reviewed by: imp Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4182
* If you backup a large file that is mostly holes, previously we'd issuejmg2015-11-161-3/+27
| | | | | | | | | | a seek for every block... For large (Exabyte sized files) this would issue lots of unneeded seeks, so combine them... Thanks for the work Jan, sorry took so long to commit... And an item completed off the IdeasPage! Submitted by: Jan Sucan
* Fix resource leaks in error cases.trasz2015-11-111-8/+9
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Userspace part of reroot support. This makes it possible to changetrasz2015-11-085-22/+316
| | | | | | | | | | | | | the root filesystem without full reboot, using "reboot -r". This can be used to to eg. boot from a temporary md_image preloaded by loader(8), setup an iSCSI session, and continue booting from rootfs mounted over iSCSI. Reviewed by: kib@, bapt@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3693
* savecore(8): Be quiet unless the user asks for verbosecem2015-11-071-7/+10
| | | | | | | Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229
* Follow-up to r290475: Add sysctl(8) support for added typescem2015-11-071-28/+81
| | | | Sponsored by: EMC / Isilon Storage Division
* Always check the return value of lseek.asomers2015-11-061-6/+4
| | | | | | | | | | | | This is a follow-up to r289845, which only fixed one occurence of CID 1009429. Coverity CID: 1009429 Reviewed by: markj MFC after: 2 weeks X-MFC-With: r289845 Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D4096
* Add sysctl to control LACP strict compliance defaultsmh2015-11-061-1/+16
| | | | | | | | | | | | | Add net.link.lagg.lacp.default_strict_mode which defines the default value for LACP strict compliance for created lagg devices. Also: * Add lacp_strict option to ifconfig(8). * Fix lagg(4) creation examples. * Minor style(9) fix. MFC after: 1 week
* ifconfig: fix padding for '<ifname> scan' command outputavos2015-11-061-2/+2
| | | | | | | (S:N and beacon interval fields). Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4085
* Implement `ipfw internal olist` command to list named objects.ae2015-11-032-0/+42
| | | | | | Reviewed by: melifaro Obtained from: Yandex LLC Sponsored by: Yandex LLC
* pfctl: Fix uninitialised veriablekp2015-11-011-0/+1
| | | | | | | | | In pfctl_set_debug() we used 'level' without ever initialising it. We correctly parsed the option, but them failed to actually assign the parsed value to 'level' before performing to ioctl() to configure the debug level. PR: 202996 Submitted by: Andrej Kolontai
* Use more appropriate ${SHAREDIR} rather than /usr/share.bdrewery2015-10-271-2/+2
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so thengie2015-10-251-1/+1
| | | | | | | | | | | | | | mode value isn't always clipped to -1 when (resolution * size) == 32, which would have been the case with values => {4i,32b,32t}. This seems to have been broken in r64382. MFC after: 1 week X-MFC with: r289915 PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division
* Fix various Coverity issues in sbin/savecore/savecore.c:asomers2015-10-231-6/+6
| | | | | | | | | | | | | CID1009429: Fix unchecked return value from lseek while clearing dump CID1007781: Fix file descriptor leak in DoFile CID1007261: Don't send potentially unterminated string to syslog(3) Coverity CID: 1009429 Coverity CID: 1007781 Coverity CID: 1007261 MFC after: 2 weeks Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D3991
* sysctl(8): Fix style nitscem2015-10-231-5/+6
| | | | | Suggested by: bde Sponsored by: EMC / Isilon Storage Division
* Sysctl: Add common support for U8, U16 typescem2015-10-221-0/+28
| | | | Sponsored by: EMC / Isilon Storage Division
* Fix a ton of speelling errorseadler2015-10-217-12/+12
| | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337
* newfs_msdos: use NetBSD's mkfs_msdos.h verbatim for makefs compatibilityemaste2015-10-201-42/+50
| | | | Sponsored by: The FreeBSD Foundation
* Make libxo depend on libutil because it uses humanize_number after r287111ngie2015-10-181-1/+1
| | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division
* Replace /dev/acd0 with /dev/cd1ngie2015-10-171-3/+3
| | | | | | | | | | atapicd(4) has been removed since r249083, and if a system has more than one optical drive, it will likely be /dev/cd1 Update mount.conf(8) to reflect the change in behavior MFC after: never Sponsored by: EMC / Isilon Storage Division
* newfs_msdos: prefer snprintf to sprintfemaste2015-10-161-1/+1
| | | | | Obtained from: NetBSD Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud