coverity: Correct TOCTOU
coverity: Correct TOCTOU

In the function delete_socket we check to see if the file in question
is a socket before we delete it.  Thus there is a race condition
between the checks.  Open the directory that contains the file and
use the functions that use the directory file descriptor to remove
this race condition.

Signed-off-by: Tony Asleson <1ef2d381aa56d512126ddaacc29e68136e4fdf55@redhat.com>

tasleson/libstoragemgmt,tasleson/libstoragemgmt,tasleson/libstoragemgmt,libstorage/libstoragemgmt,libstorage/libstoragemgmt,tasleson/libstoragemgmt,tasleson/libstoragemgmt,libstorage/libstoragemgmt,libstorage/libstoragemgmt,libstorage/libstoragemgmt