[Freeipa-devel] Fix removal of ipa-kdc-proxy.conf symlink

Fraser Tweedale ftweedal at redhat.com
Mon Jun 29 13:22:10 UTC 2015


On Mon, Jun 29, 2015 at 10:54:50AM +0200, Christian Heimes wrote:
> Hello,
> 
> the attached patch fixes the first bug, that was reported by Fraser
> today. installutils.remove_file() uses os.path.exists() to check if the
> file still exists, which in turn uses stat(2). I have modified the
> function to use os.path.lexists() instead. It doesn't follow symlinks.
> 
> Because httpinstance first removes the target file
> /etc/ipa/kdcproxy/ipa-kdc-proxy.conf before it tries to remove the
> symlink /etc/httpd/conf.d/ipa-kdc-proxy.conf, the
> installutils.remove_file() ignores the dangling symlink.
> 
> Christian

ACK




More information about the Freeipa-devel mailing list