summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Only expose `hint_uaddr` in the ND_DEBUG casengie2016-05-271-0/+6
| | | | | | | | This fixes a -Wunused-but-set-variable warning with gcc MFC after: 1 week Reported by: gcc 5 Sponsored by: EMC / Isilon Storage Division
* Improve error message when failing to open a backing filebapt2016-05-271-2/+3
| | | | | | | | | | | | | | When bhyve cannot open a backing file, it now says explicitly which file could not be opened Note that the change has only be maed in block_if.c and not in pci_virtio_block.c as the error will always be catched by the first PR: 202321 (different patch) Reviewed by: grehan MFC after: 3 day Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D6576
* WITH_AUTO_OBJ: Fix crunchgen builds.bdrewery2016-05-261-1/+6
| | | | | | | | | | | | | | | | | Passing MAKEOBJDIRPREFIX to the main prog build (rescue) would confuse WITH_AUTO_OBJ and cause it to create a recursed object directory that then broke the actual prog build. This is normally not a problem since we do not call 'make -f prog.mk obj' before building anything in it. Crunchgen(1) also assumes that if -o is not passed then if an object directory does not already exist then it should build in the source directories. The normal buildworld process will have already ran 'make obj' in each of the component directories so this is not a problem. With WITH_AUTO_OBJ though this is not the case. So we must tell crunchgen(1) that MK_AUTO_OBJ=yes will create the directory and to not require it be present before generating its Makefile. Sponsored by: EMC / Isilon Storage Division
* DIRDEPS_BUILD: Update dependencies.bdrewery2016-05-261-0/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* rmextattr(8) man page clarifications regarding -qqasomers2016-05-261-1/+2
| | | | | | | | Reviewed by: ngie MFC after: 6 days X-MFC-With: 299085 Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6422
* bsdinstall: unbreak static address assignment for wired networks.avos2016-05-261-1/+5
| | | | | | | This fixes regression introduced in r298946 (fixes static address assignment for wireless networks). Reported & submitted by: allanjude
* Avoid buffer overflow or truncation when constructing path_zoneinfo_file.truckman2016-05-261-1/+3
| | | | | | Reported by: Coverity CID: 1011160 MFC after: 1 week
* Make code compile when basename() is POSIX compliant.ed2016-05-251-4/+8
| | | | | | | | | The POSIX basename() function is allowed to modify its input buffer, which means its argument is "char *". Pull a copy of the input string before computing the base. Reviewed by: jtl Differential Revision: https://reviews.freebsd.org/D6465
* Fix Coverity CIDs 1340544 Resource leak and 1340543 Use after freetruckman2016-05-253-5/+9
| | | | | | | | | | | | | | | | | | | | | | | At line 479 of ldapclient.c in client_build_req(), the error return leaks ldap_attrs (CID 1340544). It looks like this can happen if the first utoa() call in aldap_get_stringset() fails. It looks like other leaks can happen if other utoa() calls fail since scanning this array when it is freed stops when the first NULL is encountered. Fix these problems by not storing NULL in the array when utoa() fails, and by freeing ret and returning NULL if nothing is stored in the array. That way the caller will never see the ldap_attrs[0] == NULL case, so delete that check. The ber_printf_element() calls ber_free_elements() on its ber argument and returns NULL on failure. When each of its callers detects failure, they do a goto fail, which then calls ber_free_elements() with the same pointer (CID 1340543). Fix is to delete the ber_free_elements() from ber_printf_element() Reported by: Coverity CID: 1340543, 1340544 Reviewed by: araujo Differential Revision: https://reviews.freebsd.org/D6550
* Delay calling yp_malloc_dnsent() until after some additional sanitytruckman2016-05-251-3/+3
| | | | | | | | checks to avoid leaking memory on error returns. Reported by: Coverity CID: 1007416 MFC after: 1 week
* Call free(cur) if strdup(dirp->d_name) fails to avoid a memory leak.truckman2016-05-251-0/+1
| | | | | | Reported by: Coverity CID: 1007414 MFC after: 1 week
* Fix acpidb CIDs 1011279 (Buffer not null terminated) and 978405 andtruckman2016-05-241-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1199380 (Resource leak). load_dsdt() calls strncpy() to copy a filename and Coverity warns that the destination buffer may not be NUL terminated. Fix this by using strlcpy() instead. If silent truncation occurs, then the filename was not valid anyway. load_dsdt() leaks an fd (CID 978405) and a memory region allocated using mmap() (CID 1199380) when it returns. Fix these by calling close() and munmap() as appropriate. Don't bother fixing the minor memory leak "list", allocated by AcGetAllTablesFromFile() (CID 1355191). Check for truncation when creating the temp file name. Set a flag to indicate that the temp file should be unlinked. Relying on a strcmp() test could delete the input file in contrived cases. Reported by: Coverity CID: 1011279, 978405, 1199380 Reviewed by: jkim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6368
* Fix acpidump CID 1011278 (Buffer not null terminated) and other issuestruckman2016-05-241-18/+43
| | | | | | | | | | | | | | | | | | | | | | | Coverity reports that a buffer used for temporary file generation might not be NUL terminated by strncpy(). This is probably not true because the input gets passed through realpath(), but if the path name is sufficiently long the name could be truncated and cause other problems. The code for generating the temp file names is also overly complex. Instead of a bunch of calls to strncpy() and and strncat(), simplify the code by using snprintf() and add checks for unexpected truncation. The output file created by iasl -d is predictable. Fix this by using mkdtemp() to create a directory to hold the iasl input and output files. Check the return values of more syscalls. Reported by: Coverity CID: 1011278 Reviewed by: jkim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6360
* Fix CID 1006692 in /usr/sbin/pw pw_log() function and other fixestruckman2016-05-241-21/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | The length of the name returned from the $LOGNAME and $USER can be very long and it was being concatenated to a fixed length buffer with no bounds checking. Fix this problem by limiting the length of the name copied. Additionally, this name is actually used to create a format string to be used in adding log file entries so embedded % characters in the name could confuse *printf(), and embedded whitespace could confuse a log file parser. Handle the former by escaping each % with an additional %, and handle the latter by simply stripping it out. Clean up the code by moving the variable declarations to the top of the function, formatting them to conform with style, and moving intialization elsewhere. Reduce code indentation by returning early in a couple of places. Reported by: Coverity CID: 1006692 Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6490
* It seems <sys/types.h> is a new prerequisite for <bitstring.h> afterpeter2016-05-243-1/+3
| | | | r300539. Attempt to fix the build for i386.
* Fix multiple Coverity Out-of-bounds access false postive issues in CAMtruckman2016-05-242-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The currently used idiom for clearing the part of a ccb after its header generates one or two Coverity errors for each time it is used. All instances generate an Out-of-bounds access (ARRAY_VS_SINGLETON) error because of the treatment of the header as a two element array, with a pointer to the non-existent second element being passed as the starting address to bzero(). Some instances also alsp generate Out-of-bounds access (OVERRUN) errors, probably because the space being cleared is larger than the sizeofstruct ccb_hdr). In addition, this idiom is difficult for humans to understand and it is error prone. The user has to chose the proper struct ccb_* type (which does not appear in the surrounding code) for the sizeof() in the length calculation. I found several instances where the length was incorrect, which could cause either an actual out of bounds write, or incompletely clear the ccb. A better way is to write the code to clear the ccb itself starting at sizeof(ccb_hdr) bytes from the start of the ccb, and calculate the length based on the specific type of struct ccb_* being cleared as specified by the union ccb member being used. The latter can normally be seen in the nearby code. This is friendlier for Coverity and other static analysis tools because they will see that the intent is to clear the trailing part of the ccb. Wrap all of the boilerplate code in a convenient macro that only requires a pointer to the desired union ccb member (or a pointer to the union ccb itself) as an argument. Reported by: Coverity CID: 1007578, 1008684, 1009724, 1009773, 1011304, 1011306 CID: 1011307, 1011308, 1011309, 1011310, 1011311, 1011312 CID: 1011313, 1011314, 1011315, 1011316, 1011317, 1011318 CID: 1011319, 1011320, 1011321, 1011322, 1011324, 1011325 CID: 1011326, 1011327, 1011328, 1011329, 1011330, 1011374 CID: 1011390, 1011391, 1011392, 1011393, 1011394, 1011395 CID: 1011396, 1011397, 1011398, 1011399, 1011400, 1011401 CID: 1011402, 1011403, 1011404, 1011405, 1011406, 1011408 CID: 1011409, 1011410, 1011411, 1011412, 1011413, 1011414 CID: 1017461, 1018387, 1086860, 1086874, 1194257, 1229897 CID: 1229968, 1306229, 1306234, 1331282, 1331283, 1331294 CID: 1331295, 1331535, 1331536, 1331539, 1331540, 1341623 CID: 1341624, 1341637, 1341638, 1355264, 1355324 Reviewed by: scottl, ken, delphij, imp MFH: 1 month Differential Revision: https://reviews.freebsd.org/D6496
* Only set kern.geom.part.mbr.enforce_chs=0 once, instead of once per diskallanjude2016-05-241-1/+1
| | | | Sponsored by: ScaleEngine Inc.
* Add support for RAID 1+0 (striped mirrors) to bsdinstall/zfsbootallanjude2016-05-241-5/+40
| | | | Sponsored by: ScaleEngine Inc.
* Only export and re-import the root pool if installing on MBRallanjude2016-05-231-22/+26
| | | | | | This step is required in order to dd the boot2 bits into the ZFS partition Sponsored by: ScaleEngine Inc.
* Fix missing pool name in zfs set commandallanjude2016-05-231-1/+1
|
* Fix error in bsdinstall where additional filesystems cannot be mountedallanjude2016-05-231-1/+5
| | | | | | | | | | | Do not set canmount=noauto on the boot environment at create time, because this causes / to not be mounted, and since the chroot is read only, new mountpoints cannot be created. The property is set later, when other properties are adjusted Reported by: HardenedBSD Sponsored by: ScaleEngine Inc.
* Build iscsid(8) with ICL_KERNEL_PROXY defined by default, as requiredtrasz2016-05-231-1/+1
| | | | | | | | for iSER. Obtained from: Mellanox Technologies MFC after: 1 month Sponsored by: The FreeBSD Foundation
* bsdinstall/zfsboot GPT+BIOS+GELI installs now make use of GELIBOOTallanjude2016-05-221-60/+84
| | | | | | | | | | | | In this configuration, a separate bootpool is not required. This allows ZFS Boot Environments to be used with GELI encrypted ZFS pools. Support for GPT+EFI+GELI is planned for the future. Tested by: Joseph Mingrone, HardenedBSD Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D5869
* Wrap EXPAND(..) macro with a do-while(0) loop and put a single statement on ↵ngie2016-05-221-1/+4
| | | | | | | | | | | | | each line As a positive side-effect, this eliminates the double semicolons reported by Coverity: the macro contained a trailing semicolon, in addition to the semicolon placed on each line where EXPAND(..) was called. MFC after: 1 week Reported by: Coverity CID: 1194269 Sponsored by: EMC / Isilon Storage Division
* Fix default ZFS layout to work better by default with sysutils/beadmallanjude2016-05-221-1/+1
| | | | | | | | | The root file system is mounted early via vfs.root.mountfrom. The canmount=noauto property only affects the zfs rc.d script. This ensures that the 'default' BE is not mounted overtop of another BE when one is selected from the beastie menu Sponsored by: ScaleEngine Inc.
* Fix typo in comments for the zfsboot scriptbapt2016-05-221-1/+1
| | | | Submitted by: Colby Swandale <colby@taplaboratories.com.au> (via github)
* Better document security_show_{success,info,badconfig} in /etc/periodic.confasomers2016-05-212-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | periodic(8) already handles the security_show_{success,info,badconfig} variables correctly. However, those variables aren't explicitly set in /etc/defaults/periodic.conf or anywhere else, which suggests to the user that they shouldn't be used. etc/defaults/periodic.conf Explicitly set defaults for security_show_{success,info,badconfig} usr.sbin/periodic/periodic.sh Update usage string usr.sbin/periodic/periodic.8 Minor man page updates One thing I'm _not_ doing is recommending setting security_output to /var/log/security.log or adding that file to /etc/newsyslog.conf, because periodic(8) would create it with default permissions, usually 644, and that's probably a bad idea. Reviewed by: brd MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6477
* Adjust a couple of error cases in camdd(8).ken2016-05-191-3/+6
| | | | | | | | | | | | usr.sbin/camdd/camdd.c: In camdd_probe_file(), fix an error case after fstat where we were bailing out and leaving two lines of cleanup code unexecuted. Instead, just goto bailout_error. In camdd_probe_pass(), fail if the sector size is 0. Sponsored by: Spectra Logic MFC after: 3 days
* When iscsid(8) is running in ICL proxy mode, don't try to send Logout PDUs.trasz2016-05-191-0/+12
| | | | | | | The kernel already does this for us when we ask it to terminate the session. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix error message.trasz2016-05-191-2/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Add support for managing Shingled Magnetic Recording (SMR) drives.ken2016-05-195-2/+886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes support for SCSI SMR drives (which conform to the Zoned Block Commands or ZBC spec) and ATA SMR drives (which conform to the Zoned ATA Command Set or ZAC spec) behind SAS expanders. This includes full management support through the GEOM BIO interface, and through a new userland utility, zonectl(8), and through camcontrol(8). This is now ready for filesystems to use to detect and manage zoned drives. (There is no work in progress that I know of to use this for ZFS or UFS, if anyone is interested, let me know and I may have some suggestions.) Also, improve ATA command passthrough and dispatch support, both via ATA and ATA passthrough over SCSI. Also, add support to camcontrol(8) for the ATA Extended Power Conditions feature set. You can now manage ATA device power states, and set various idle time thresholds for a drive to enter lower power states. Note that this change cannot be MFCed in full, because it depends on changes to the struct bio API that break compatilibity. In order to avoid breaking the stable API, only changes that don't touch or depend on the struct bio changes can be merged. For example, the camcontrol(8) changes don't depend on the new bio API, but zonectl(8) and the probe changes to the da(4) and ada(4) drivers do depend on it. Also note that the SMR changes have not yet been tested with an actual SCSI ZBC device, or a SCSI to ATA translation layer (SAT) that supports ZBC to ZAC translation. I have not yet gotten a suitable drive or SAT layer, so any testing help would be appreciated. These changes have been tested with Seagate Host Aware SATA drives attached to both SAS and SATA controllers. Also, I do not have any SATA Host Managed devices, and I suspect that it may take additional (hopefully minor) changes to support them. Thanks to Seagate for supplying the test hardware and answering questions. sbin/camcontrol/Makefile: Add epc.c and zone.c. sbin/camcontrol/camcontrol.8: Document the zone and epc subcommands. sbin/camcontrol/camcontrol.c: Add the zone and epc subcommands. Add auxiliary register support to build_ata_cmd(). Make sure to set the CAM_ATAIO_NEEDRESULT, CAM_ATAIO_DMA, and CAM_ATAIO_FPDMA flags as appropriate for ATA commands. Add a new get_ata_status() function to parse ATA result from SCSI sense descriptors (for ATA passthrough over SCSI) and ATA I/O requests. sbin/camcontrol/camcontrol.h: Update the build_ata_cmd() prototype Add get_ata_status(), zone(), and epc(). sbin/camcontrol/epc.c: Support for ATA Extended Power Conditions features. This includes support for all features documented in the ACS-4 Revision 12 specification from t13.org (dated February 18, 2016). The EPC feature set allows putting a drive into a power power mode immediately, or setting timeouts so that the drive will automatically enter progressively lower power states after various idle times. sbin/camcontrol/fwdownload.c: Update the firmware download code for the new build_ata_cmd() arguments. sbin/camcontrol/zone.c: Implement support for Shingled Magnetic Recording (SMR) drives via SCSI Zoned Block Commands (ZBC) and ATA Zoned Device ATA Command Set (ZAC). These specs were developed in concert, and are functionally identical. The primary differences are due to SCSI and ATA differences. (SCSI is big endian, ATA is little endian, for example.) This includes support for all commands defined in the ZBC and ZAC specs. sys/cam/ata/ata_all.c: Decode a number of additional ATA command names in ata_op_string(). Add a new CCB building function, ata_read_log(). Add ata_zac_mgmt_in() and ata_zac_mgmt_out() CCB building functions. These support both DMA and NCQ encapsulation. sys/cam/ata/ata_all.h: Add prototypes for ata_read_log(), ata_zac_mgmt_out(), and ata_zac_mgmt_in(). sys/cam/ata/ata_da.c: Revamp the ada(4) driver to support zoned devices. Add four new probe states to gather information needed for zone support. Add a new adasetflags() function to avoid duplication of large blocks of flag setting between the async handler and register functions. Add new sysctl variables that describe zone support and paramters. Add support for the new BIO_ZONE bio, and all of its subcommands: DISK_ZONE_OPEN, DISK_ZONE_CLOSE, DISK_ZONE_FINISH, DISK_ZONE_RWP, DISK_ZONE_REPORT_ZONES, and DISK_ZONE_GET_PARAMS. sys/cam/scsi/scsi_all.c: Add command descriptions for the ZBC IN/OUT commands. Add descriptions for ZBC Host Managed devices. Add a new function, scsi_ata_pass() to do ATA passthrough over SCSI. This will eventually replace scsi_ata_pass_16() -- it can create the 12, 16, and 32-byte variants of the ATA PASS-THROUGH command, and supports setting all of the registers defined as of SAT-4, Revision 5 (March 11, 2016). Change scsi_ata_identify() to use scsi_ata_pass() instead of scsi_ata_pass_16(). Add a new scsi_ata_read_log() function to facilitate reading ATA logs via SCSI. sys/cam/scsi/scsi_all.h: Add the new ATA PASS-THROUGH(32) command CDB. Add extended and variable CDB opcodes. Add Zoned Block Device Characteristics VPD page. Add ATA Return SCSI sense descriptor. Add prototypes for scsi_ata_read_log() and scsi_ata_pass(). sys/cam/scsi/scsi_da.c: Revamp the da(4) driver to support zoned devices. Add five new probe states, four of which are needed for ATA devices. Add five new sysctl variables that describe zone support and parameters. The da(4) driver supports SCSI ZBC devices, as well as ATA ZAC devices when they are attached via a SCSI to ATA Translation (SAT) layer. Since ZBC -> ZAC translation is a new feature in the T10 SAT-4 spec, most SATA drives will be supported via ATA commands sent via the SCSI ATA PASS-THROUGH command. The da(4) driver will prefer the ZBC interface, if it is available, for performance reasons, but will use the ATA PASS-THROUGH interface to the ZAC command set if the SAT layer doesn't support translation yet. As I mentioned above, ZBC command support is untested. Add support for the new BIO_ZONE bio, and all of its subcommands: DISK_ZONE_OPEN, DISK_ZONE_CLOSE, DISK_ZONE_FINISH, DISK_ZONE_RWP, DISK_ZONE_REPORT_ZONES, and DISK_ZONE_GET_PARAMS. Add scsi_zbc_in() and scsi_zbc_out() CCB building functions. Add scsi_ata_zac_mgmt_out() and scsi_ata_zac_mgmt_in() CCB/CDB building functions. Note that these have return values, unlike almost all other CCB building functions in CAM. The reason is that they can fail, depending upon the particular combination of input parameters. The primary failure case is if the user wants NCQ, but fails to specify additional CDB storage. NCQ requires using the 32-byte version of the SCSI ATA PASS-THROUGH command, and the current CAM CDB size is 16 bytes. sys/cam/scsi/scsi_da.h: Add ZBC IN and ZBC OUT CDBs and opcodes. Add SCSI Report Zones data structures. Add scsi_zbc_in(), scsi_zbc_out(), scsi_ata_zac_mgmt_out(), and scsi_ata_zac_mgmt_in() prototypes. sys/dev/ahci/ahci.c: Fix SEND / RECEIVE FPDMA QUEUED in the ahci(4) driver. ahci_setup_fis() previously set the top bits of the sector count register in the FIS to 0 for FPDMA commands. This is okay for read and write, because the PRIO field is in the only thing in those bits, and we don't implement that further up the stack. But, for SEND and RECEIVE FPDMA QUEUED, the subcommand is in that byte, so it needs to be transmitted to the drive. In ahci_setup_fis(), always set the the top 8 bits of the sector count register. We need it in both the standard and NCQ / FPDMA cases. sys/geom/eli/g_eli.c: Pass BIO_ZONE commands through the GELI class. sys/geom/geom.h: Add g_io_zonecmd() prototype. sys/geom/geom_dev.c: Add new DIOCZONECMD ioctl, which allows sending zone commands to disks. sys/geom/geom_disk.c: Add support for BIO_ZONE commands. sys/geom/geom_disk.h: Add a new flag, DISKFLAG_CANZONE, that indicates that a given GEOM disk client can handle BIO_ZONE commands. sys/geom/geom_io.c: Add a new function, g_io_zonecmd(), that handles execution of BIO_ZONE commands. Add permissions check for BIO_ZONE commands. Add command decoding for BIO_ZONE commands. sys/geom/geom_subr.c: Add DDB command decoding for BIO_ZONE commands. sys/kern/subr_devstat.c: Record statistics for REPORT ZONES commands. Note that the number of bytes transferred for REPORT ZONES won't quite match what is received from the harware. This is because we're necessarily counting bytes coming from the da(4) / ada(4) drivers, which are using the disk_zone.h interface to communicate up the stack. The structure sizes it uses are slightly different than the SCSI and ATA structure sizes. sys/sys/ata.h: Add many bit and structure definitions for ZAC, NCQ, and EPC command support. sys/sys/bio.h: Convert the bio_cmd field to a straight enumeration. This will yield more space for additional commands in the future. After change r297955 and other related changes, this is now possible. Converting to an enumeration will also prevent use as a bitmask in the future. sys/sys/disk.h: Define the DIOCZONECMD ioctl. sys/sys/disk_zone.h: Add a new API for managing zoned disks. This is very close to the SCSI ZBC and ATA ZAC standards, but uses integers in native byte order instead of big endian (SCSI) or little endian (ATA) byte arrays. This is intended to offer to the complete feature set of the ZBC and ZAC disk management without requiring the application developer to include SCSI or ATA headers. We also use one set of headers for ioctl consumers and kernel bio-level consumers. sys/sys/param.h: Bump __FreeBSD_version for sys/bio.h command changes, and inclusion of SMR support. usr.sbin/Makefile: Add the zonectl utility. usr.sbin/diskinfo/diskinfo.c Add disk zoning capability to the 'diskinfo -v' output. usr.sbin/zonectl/Makefile: Add zonectl makefile. usr.sbin/zonectl/zonectl.8 zonectl(8) man page. usr.sbin/zonectl/zonectl.c The zonectl(8) utility. This allows managing SCSI or ATA zoned disks via the disk_zone.h API. You can report zones, reset write pointers, get parameters, etc. Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D6147 Reviewed by: wblock (documentation)
* Initialize date of rootNode.sjg2016-05-181-0/+3
| | | | Reviewed by: jtl
* Revert r299830, it has couple of fatal errors.glebius2016-05-181-0/+1
| | | | | | | The CMSG_ family of macros take care of alignment, so we don't need r299830 at all, even if it was correct. Put NO_WCAST_ALIGN into Makefile. Together with: peter
* makefs(8): Clarify the comment concerning seeding.pfg2016-05-181-1/+4
| | | | | Avoid giving the impression makefs currently supports reproduceable builds.
* makefs(1): use all the random(3) range.pfg2016-05-171-1/+2
| | | | | | | | | | | | The generation number is uint32_t so we can fit the complete range of random(3). We could have used arc4random() but the result would be unpredictable and it would prohibit reproducible builds. While here add a comment where seeding is done: this affects reproducible builds and might have to be re-visited to use a release dependent value. MFC after: 2 weeks
* makefs(8): use NULL instead of zero for pointers.pfg2016-05-171-5/+5
|
* Don't repeat the the word 'the'eadler2016-05-172-2/+2
| | | | | | | (one manual change to fix grammar) Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
* Add initial support for negotiating iSER parameters to iscsid(8). Sometrasz2016-05-171-2/+42
| | | | | | | | | rework might be needed to support asymetrical limits, but this should be ok for now. Obtained from: Mellanox Technologies (earlier version) MFC after: 1 month Sponsored by: The FreeBSD Foundation
* When clearing rtmsg, pass &rtmsg to bzero() instead of the address oftruckman2016-05-171-1/+1
| | | | | | | | just the header Reported by: Coverity CID: 1007568, 1194256 MFC after: 1 week
* Don't walk off the end of the array when proto isn't explicitlytruckman2016-05-161-7/+7
| | | | | | | | listed above. Instead update the catch-all "Others" bucket. Reported by: Coverity CID: 1007571, 1007572 MFC after: 1 week
* Set ai2 to NULL in in find_host() before the loop and after callingtruckman2016-05-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | freeaddrinfo() on it to indicate that it doesn't point to a valid addrinfo list. This fixes this Coverity issues: 1006368 Uninitialized pointer read 1018506 Double free 1305590 Resource leak that can be triggered in the hp->hostname[0] != '\0' case. Don't treat a character as a boolean. Fix these Coverity issues: 1009293 Unchecked return value from library 1194246 Wrong size argument by tweaking the status file extend code. Reported by: Coverity CID: 1006368, 1018506, 1305590, 1009293, 1194246 Reviewed by: rmacklem Feedback from: hrs MFC after: 1 week Differential Revision: D6398
* Actually use the loop interation limit so carefully computed on thetruckman2016-05-161-1/+1
| | | | | | | | | | | previous line to prevent buffer overflow. This turns out to not be important because the upstream xdr code already capped the object size at the proper value. Using the correct limit here looks a lot less scary and should please Coverity. Reported by: Coverity CID: 1199309, 1199310 MFC after: 1 week
* Fix an off by one error to avoid overflowing rp[].truckman2016-05-161-1/+1
| | | | | Reported by: Coverity CID: 1007579
* NULL releasedfl after calling deallocate_file_lock() which frees ittruckman2016-05-161-0/+1
| | | | | | | | | to avoid a use-after-free error in the debuglog() call at the top of the loop. Reported by: Coverity CID: 1006080 MFC after: 1 week
* pdu_delete(request) frees request, so move the call aftertruckman2016-05-161-1/+1
| | | | | | | login_new_response(request) to avoid a use-after-free error Reported by: Coverity Reviewed by: 1331219, 1331220
* Don't free fnamebuf before we calling cfgfile_add(). This changes atruckman2016-05-161-2/+3
| | | | | | | use-after-free error into a minor memory leak. Reported by: Coverity CID: 1006084
* Simplify overengineered and buggy code that looked like as if it didaraujo2016-05-161-29/+18
| | | | | | | | some kind of UTF-8 validation, but actually didn't, but instead, for malformed UTF-8 input, caused buffer overruns in some cases and caused skipping of valid ASCII characters in other cases. Obtained from: OpenBSD (cvs 1.32)
* When a group contains a non-existent user, make the warningaraujo2016-05-161-3/+2
| | | | | | message more helpful by mentioning the group name. Obtained from: OpenBSD (cvs 1.19)
* Use NULL instead of 0 for pointers.araujo2016-05-161-1/+1
| | | | MFC after: 2 weeks.
* Use strlcpy() instead of strncpy() when copying ifname to ensuretruckman2016-05-151-1/+1
| | | | | | | | | that it is NUL terminated. Additional NUL padding is not required for short names. Reported by: Coverity CID: 1009974 MFC after: 1 week
OpenPOWER on IntegriCloud