]> git.ipfire.org Git - thirdparty/libvirt.git/commit
avoid malfunction when virFileResolveLink is applied to non-POSIX FS
authorJim Meyering <meyering@redhat.com>
Tue, 15 Dec 2009 07:27:53 +0000 (08:27 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 15 Dec 2009 16:46:04 +0000 (17:46 +0100)
commit5baa463541d9081d43e86237e88d3041b4ae6338
tree35917a34c36c361a96297e084c2d7b5fc97523ae
parentf3cbd24ddc88f6d5d2c8f174e24ed9aa4670336b
avoid malfunction when virFileResolveLink is applied to non-POSIX FS

The virFileResolveLink utility function relied on the POSIX guarantee
that stat.st_size of a symlink is the length of the value.  However,
on some types of file systems, it is invalid, so do not rely on it.
Use gnulib's areadlink module instead.
* bootstrap (modules): Add areadlink.
* src/util/util.c: Include "areadlink.h".
Let areadlink perform the readlink and malloc.
* configure.in (AC_CHECK_FUNCS): Remove readlink.  No need,
since it's presence is guaranteed by gnulib.
bootstrap
configure.in
src/util/util.c