libudev: monitor - warn if we fail to request SO_PASSCRED

The function still succeeds, so there is no functional change. This fixes CID #996288.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: fix path for database names on 'change' event

If a device does not have a major/minor number attached, we use different
database names than if it does. On "change" events, we didn't copy the
devnum over, therefore, we used different paths than on 'add' or 'remove'
events (where devnum was properly copied).

Fix this by always copying the devnum into the udev-device.

(David: added commit-log from email)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udevd: parse_argv - warn if argumens are invalid

Found by Coverity. Fixes CID #1238780.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udevd: check return of various functions

One reported by Coverity. Fixes CID #996252.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udevadm: hwdb - check return value of fseeko()

Fonud by Coverity. Fixes CID #996255.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
src/udev/udev-node.c: replace our error handling with upstreams

eudev has had this error handling for a while.  upstream finally
added it with the following commit

    543afdc63c02a5af3cf6bd2a264162f23474346a

by Tom Gundersen <teg@jklm.no>.  Both methods are equivalent, but
we adopt upstreams for easier maintenance.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: ctrl - log if setting SO_PASSCRED fails

No functional change.

Found by Coverity. Fixes CID #1237533.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: fix typos

Spotted by Andreas Henriksson.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udevd: don't fail if /run/udev exists

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>