[PATCH 03/78] libmultipath: filter for missing property in get_refwwid()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



get_refwwid() needs to filter for missing udev properties,
otherwise it'll accept just about any SCSI device.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 libmultipath/configure.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 1e6a0c5..9012258 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -962,6 +962,9 @@ get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid)
 				return ret;
 			}
 		}
+		if (pp->udev && filter_property(conf, pp->udev) > 0)
+			return 2;
+
 		refwwid = pp->wwid;
 		goto out;
 	}
@@ -986,6 +989,9 @@ get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid)
 				return ret;
 			}
 		}
+		if (pp->udev && filter_property(conf, pp->udev) > 0)
+			return 2;
+
 		refwwid = pp->wwid;
 		goto out;
 	}
-- 
1.8.4.5

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux