libstorage / libstoragemgmt

A library for storage management
https://libstorage.github.io/libstoragemgmt-doc/
GNU Lesser General Public License v2.1
83 stars 32 forks source link

coverity: Correct TOCTOU #503

Closed tasleson closed 2 years ago

tasleson commented 2 years ago

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 tasleson@redhat.com

CI REDO