[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] failure to find hostname causing fatal error



Trying to inspect an old OpenSuSE image, which has an empty
/etc/HOSTNAME file.   This causes check_hostname_unix() in
inspect_fs_unix() to return -1 -- causing inspection to fail.
Somewhat interestingly, if no files of interest were found, the
function would return 0.....which I think doesn't cause problems
upstream.

It's somewhat related to this closed bug where the fix was to set the
return code to 0 and hostname could end up null.

https://bugzilla.redhat.com/show_bug.cgi?id=726739


It may be correct, in fact, to try each of the hostname checks until 1
succeeds or they all fail, and then return 0 in all cases.

--Todd


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]