libmultipath: filter for missing property in get_refwwid()
authorHannes Reinecke <hare@suse.de>
Thu, 13 Feb 2014 15:33:27 +0000 (16:33 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 15:38:32 +0000 (17:38 +0200)
get_refwwid() needs to filter for missing udev properties,
otherwise it'll accept just about any SCSI device.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/configure.c

index 1e6a0c5..9012258 100644 (file)
@@ -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;
        }