libmultipath: ensure checker->fd == -1 if not set
authorMartin Wilck <mwilck@suse.com>
Wed, 20 Sep 2017 20:28:15 +0000 (22:28 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 15 Nov 2017 22:16:37 +0000 (23:16 +0100)
commit336a21f6b809cfa96923fab7a226ab6b8150431d
tree833996ec035d08aa7379480bd22baabcab566037
parent8524f4d957c61771718576070738667bb144bc46
libmultipath: ensure checker->fd == -1 if not set

Since 2be1fbf06c90 "libmultipath: sanitize fd handling", we treat
fd == 0 as a valid value. Make sure that this value isn't accidentally
set. Also, fix one more case where fd == 0 was considered invalid.

Fixes: 2be1fbf06c90 libmultipath: sanitize fd handling
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/checkers.c
libmultipath/checkers.h
libmultipath/checkers/cciss_tur.c
libmultipath/discovery.c
libmultipath/structs.c