Commit Graph

15772 Commits

Author SHA1 Message Date
bdrewery
71fccfc30f Add missing CLEANFILES.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 23:15:24 +00:00
amdmi3
e84416dd44 Fix crash on parsing some inf files
ndiscvt uses 16 entry array for words into which it parses
comma-separated lists of strings, like AddReg line in

    [somesection]
        AddReg = foo.reg, bar.reg, baz.reg, quiz.reg

Overflows were not checked so it crashed on a line with 17 words
encountered in some Broadcom/Dell Wireless 1704 802.11b-g-n driver

So extend the array up to 32 entries and add an overflow check.

Reviewed by:	bapt
Approved by:	bapt
MFC after:	2 weeks
Differential Revision:	D3713
2015-09-22 16:59:41 +00:00
jkim
d8c7e0bbfa Remove unsupported S5 (power off) state since r170976.
Reported by:	Iam Smith (smithi at nimnet dot asn dot au)
MFC after:	3 days
2015-09-22 16:35:32 +00:00
cem
d588782054 ngctl dot: Drop invalid trailing semi-colon
PR:		203257
Submitted by:	Daniel O'Connor
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 01:31:01 +00:00
mav
e968ae531f Make cltd ignore HA ports. 2015-09-21 10:27:30 +00:00
hrs
9217785474 - Remove unused union p_un.
- Use NI_MAXHOST-long buffer for getnameinfo().
  Although INET6_ADDRSTRLEN was designed to hold the longest
  IPv6 address in IPv4-mapped address format a long time ago,
  getnameinfo() can return scope identifier in addition to it.

MFC after:	1 day
2015-09-19 23:48:06 +00:00
hrs
640e18a8e1 - Fix a crash on a rpc entry when an IPv6 address is explicitly specified
in -a flag.

- Fix a bug that sockaddr_in was used where sockaddr_in6 should have
  been used.  This was not actually harmful because offsetof(struct
  sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6,
  sin6_port).

MFC after:	1 day
2015-09-19 23:27:22 +00:00
delphij
50393939f1 'sin' is never used after assignment. Looking at the context, it seems
that it belongs the commented out section of code so make it part of that
section.

Reported by:	clang static analyzer
MFC after:	2 weeks
2015-09-19 20:12:53 +00:00
allanjude
006bc6579c Rename some functions and variables inside sesutil(8) to make gcc happy
Reported by:	bz
Approved by:	bapt (implicit)
Sponsored by:	ScaleEngine Inc.
2015-09-19 18:41:24 +00:00
bdrewery
dfc33083c5 Connect sesutil(1) and numactl(1) for META_MODE.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 17:47:36 +00:00
allanjude
be1e5390b1 Improve and expand sesutil(8)
- Return an error if no matching device is found when the locate command is run
- Enhance the locate command to be able to address drive bays with no disk, or where the SES controller has not made the mapping to the device name
- Added the fault command, similar to locate, but a different SES property. On some of my controllers locate blinks the activity light, others the fault light. The fault command keeps the fault light on constant.
- Improve the usage() output and use it everywhere
- Added the map command, displays all elements connected to each (or the specified) ses(4) controller
- Added the status command, returns the overall status of the ses(4) controller

Reviewed by:	wblock (man page, earlier version)
Approved by:	bapt (mentor)
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3580
2015-09-19 16:36:45 +00:00
bdrewery
070dfcc90f Replace afterinstall: hack from r54681 with 'make delete-old' functionality.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 03:51:19 +00:00
bdrewery
e27c20e7fb Remove redundant beforeinstall. 2015-09-18 23:34:47 +00:00
delphij
89dceb6a3f Eliminate unneeded copying of vdev data, goto, etc. and add a note
that checksum of vdev label should be checked (which is not done
currently).

No functional change.

While I'm there, raise WARNS to 2.

Reviewed by:	allanjude
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3508
2015-09-17 20:55:47 +00:00
delphij
45de056048 Use strlcpy() instead of strncpy() because subsequent mkstemps expects
the string be nul-terminated.

Reviewed by:	neel
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3685
2015-09-17 18:11:26 +00:00
bdrewery
bdebc05d94 Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
des
76309d54d2 If forwarders were specified on the command line, create an empty
resolvconf.conf so that resolvconf won't replace the manually configured
forwarders with dynamically configured ones the next time the lease is
renewed.
2015-09-16 23:09:31 +00:00
allanjude
a0b376093c Add a number of models to the bsdinstall GPT hack blacklist
PR:		194359
Approved by:	bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3525
2015-09-16 03:32:27 +00:00
mav
6e36742bfe Add ctl-lun config option for consistency in HA setups. 2015-09-15 13:37:48 +00:00
zbb
3eb40986b7 Perform I2C transmission in a single burst when mode is "none" or not set
Some more automated I2C controllers cannot explicitly create
START/STOP/etc. conditions on the bus.
Instead, the correct condition is set automatically according
to the pending transfer status.
This particular behavior can cause trouble if some I2C slave
requires sending address offset within the chip followed by
the actual data or command. In that case we cannot assume that
the driver will not STOP immediately after sending
offset.

To avoid that, do not split offset transfer from data transfer
for default transmission modes and do exactly that if requested
in command line (stop-start and repeated-start modes).
This more generic approach should cover special cases like
the one described.

Reviewed by:   imp
Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
2015-09-15 11:21:16 +00:00
dteske
ac9abcb30c Fix code typo (no functional change)
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-14 21:26:48 +00:00
bapt
7322dfff51 Regression: fix usershow -7
Submitted by:	Dan McGregor (via IRC)
MFC after:	2 days
2015-09-14 19:23:00 +00:00
mav
7b4b3f9d39 Add negotiation of iSCSIProtocolLevel to 2 (RFC7144).
We may need to pass negotiated value to kernel level, but so far it is
not necessary, since it does not use any new features without request.
2015-09-13 20:58:22 +00:00
mav
7e1bc451f0 When updating port, apply only change of LUN map, not whole. 2015-09-13 15:08:06 +00:00
mav
ceb1e1488d CTL documentation update, mostly for HA. 2015-09-12 10:23:23 +00:00
bapt
951f381262 Regression: fix pw usermod -d
Mark the user has having been edited if -d option is passed to usermod and
so the request change of home directory actually happen

PR:		203052
Reported by:	lenzi.sergio@gmail.com
MFC after:	2 days
2015-09-12 08:24:25 +00:00
dteske
5e11e37006 Replace `return' outside of function with exit
MFC after:	3 days
X-MFC-to:	stable/10
Pointy hat to:	me
2015-09-11 21:18:21 +00:00
dteske
d84010cd10 Use a variable for readability
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:14:48 +00:00
dteske
336ab64092 Update copyright
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:13:34 +00:00
dteske
d06c7f4aee Better to reset trap and explicitly exit success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:12:41 +00:00
dteske
cf27eb785e Remove trailing newline at EOF
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:09:39 +00:00
dteske
619846e1ef Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:08:46 +00:00
dteske
b7553a37e9 Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:01:26 +00:00
dteske
41e091074a Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:59:13 +00:00
dteske
4f2a0e318f Update copyrights
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:58:00 +00:00
dteske
5e54510dd0 Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:56:36 +00:00
dteske
5bd4f328a6 Remove use of return outside of function
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:45:41 +00:00
dteske
bc7a1b0134 Ignore error results from newaliases(1)
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:39:41 +00:00
delphij
85e8cd9339 Use strlcpy() in favor of strncpy() as it's defined to have a nul character
at the end of string buffer, and the code context do expects this to behave
correctly (e.g. strchr).

Note that we do not believe there is real-world impact for gstat(8)'s usage
because the strings are length checked, and the on-stack buffer belongs to
main() and we can expect to have zeros in them.

MFC after:	2 weeks
2015-09-11 06:52:57 +00:00
mav
1d4ff31d06 Remove unused target and initiator IDs. 2015-09-10 10:46:21 +00:00
hrs
f39d1c8c53 - Remove #ifdef HAVE_POLL_H.
- Use nitems().

MFC after:	3 days
2015-09-10 06:40:28 +00:00
takawata
1f333be9cd fix compare argument for address type.
Submitted by: issei10193 (via Twitter)
2015-09-09 13:24:39 +00:00
jkim
f9bfc1cae4 Revert r287578. This patch requires more review.
Requested by:	adrian
2015-09-08 23:17:02 +00:00
allanjude
8779e55553 Add an additional check to service(8) -e incase rcvar is blank
Approved by:	bapt (mentor)
X-MFC-With:	287576
Differential Revision:	https://reviews.freebsd.org/D3604
2015-09-08 22:50:17 +00:00
bapt
390f3fc8ff Remove extra debug that crept in 2015-09-08 22:24:20 +00:00
bapt
57a6813e1e Implement pubkey support for the bootstrap
Note that to not interfer with finger print it expects a signature on pkg itself
which is named pkg.txz.pubkeysign

To genrate it:
echo -n "$(sha256 -q pkg.txz)" | openssl dgst -sha256 -sign /thekey \
    -binary -out ./pkg.txz.pubkeysig

Note the "echo -n" which prevent signing the '\n' one would get otherwise

PR:		202622
MFC after:	1 week
2015-09-08 21:25:36 +00:00
jkim
61177b5cd0 Enable 802.11n support.
PR:		164102
2015-09-08 21:04:33 +00:00
jkim
673603781f Sort and remove duplicate compiler flags.
MFC after:	3 days
2015-09-08 20:41:47 +00:00
allanjude
7f8c7d805b service(8) -e does not respect /etc/rc.conf.d/* entries
PR:		173454
Submitted by:	giantlock@gmail.com (original patch)
Approved by:	bapt (mentor)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3600
2015-09-08 20:22:51 +00:00
bapt
7519c8e26a Fix indentation, no functional changes 2015-09-08 19:25:15 +00:00