diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-05-24 15:40:36 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-05-24 15:40:36 +0100 |
commit | f00066d22b11bf40d0272f68565a2a27fea15627 (patch) | |
tree | 944b5fea77133648b5413a03c217019541b7e8fe /python/guestfs-py.h | |
parent | cffb7fefc88a317f957785f6448fb24183c8c629 (diff) | |
download | libguestfs-f00066d22b11bf40d0272f68565a2a27fea15627.tar.gz libguestfs-f00066d22b11bf40d0272f68565a2a27fea15627.tar.xz libguestfs-f00066d22b11bf40d0272f68565a2a27fea15627.zip |
inspection: Don't fail if /etc/HOSTNAME or /etc/hostname are empty files (RHBZ#823821).
Change guestfs___first_line_of_file so that if the file is empty this
returns an empty string instead of an error. This is consistent with
the behaviour of this function in the case where the file starts with
a \n character, where it would previously have returned an empty
string.
Change all callers so that they handle this case.
Then change the hostname parsing code so that it doesn't give up when
/etc/HOSTNAME is empty, but falls through to the next alternative, and
similarly for /etc/hostname.
Thanks Todd Mummert for finding and diagnosing this bug.
Diffstat (limited to 'python/guestfs-py.h')
0 files changed, 0 insertions, 0 deletions