50f3f34 Ticket 50989 - ignore pid when it is ourself in protect_db

Authored and Committed by firstyear 3 years ago
    Ticket 50989 - ignore pid when it is ourself in protect_db
    
    Bug Description: In protect_db.c, there are some cases (especially containers)
    where a pid number can be re-used. Following a bad shutdown, the lock files
    in /run/lock/{export,import,server}/* remain, and the pid they hold could
    be allocated to ourself. When this occurs, the server fails to start.
    
    Fix Description: If the pid of the lock file is our own pid, that is proof
    that the previous pid/lock file can not exist, and therfore it is safe to
    proceed with the startup.
    
    https://pagure.io/389-ds-base/issue/50989
    
    Author: William Brown <william@blackhats.net.au>
    
    Review by: tbordaz (Thanks!)