As flock-style locks have no way to check whether another lock on the file is held by the current process
and is safe for libdb to access the its environment (in read-mode only), a helper function that parses
/proc/locks for this information has been added.
Additionally, db-5.3.28-rpm-lock-check.patch has been modified to use the helper function in order for libdb
to not have to leak file descriptors while checking for rpm's transaction lock when accessing rpm's environment.