multipathd: Check for empty wwid when processing events

Some paths do not provide a wwid, so we need to ensure that
the wwid is present before processing an event.

References: bnc#892214

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: try to deal with bindings file hand editting

Unfortunately, instead of adding aliases to /etc/multipath.conf like they
should, some users add aliases to the bindings file. If they add aliases
that look like user_friendly_names, like mpathfoo, they interfere with
the code to find the next available user_friendly_name (giving you
mpathfop as the next user_friendly_name in this case).  This patch
will fix this by giving the next name available name after an unbroken
string of names starting with the smallest possible name. It order to keep
the choice quick, it won't handle situation where the list of names
starting at the smallest possible is not in order.  There are a number
of ways to do a better job finding the smallest possible name, but this
will fix most of the cases I've seen, without slowing things down at all.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath: fixup patch 'use dynamic string allocation ..'

Commit 0c0b383c26be99625f7d8988cb8043bd3c141ad7
'libmultipath: use dynamic string allocation when renaming'
introduced a bug as not all instances referring to
->alias_old had been converted.

Signed-off-by: Hannes Reinecke <hare@suse.de>