libvirt/src/qemu
Chris Lalancette 0117b7da68 Fix failing virGetHostname.
We've been running into a lot of situations where
virGetHostname() is returning "localhost", where a plain
gethostname() would have returned the correct thing.  This
is because virGetHostname() is *always* trying to canonicalize
the name returned from gethostname(), even when it doesn't
have to.

This patch changes virGetHostname so that if the value returned
from gethostname() is already FQDN or localhost, it returns
that string directly.  If the value returned from gethostname()
is a shortened hostname, then we try to canonicalize it.  If
that succeeds, we returned the canonicalized hostname.  If
that fails, and/or returns "localhost", then we just return
the original string we got from gethostname() and hope for
the best.

Note that after this patch it is up to clients to check whether
"localhost" is an allowed return value.  The only place
where it's currently not is in qemu migration.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2010-05-26 08:59:31 -04:00
..
libvirtd_qemu.aug qemu: Allow using regular audio backends with VNC 2010-05-25 10:49:29 -04:00
qemu_bridge_filter.c Remove conn parameter from virReportSystemError 2010-02-09 01:04:54 +01:00
qemu_bridge_filter.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_conf.c vepa: parsing for 802.1Qb{g|h} XML 2010-05-25 17:37:00 -04:00
qemu_conf.h vepa: parsing for 802.1Qb{g|h} XML 2010-05-25 17:37:00 -04:00
qemu_driver.c Fix failing virGetHostname. 2010-05-26 08:59:31 -04:00
qemu_driver.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_monitor_json.c Query block allocation extent from QEMU monitor 2010-05-24 15:55:51 -06:00
qemu_monitor_json.h Query block allocation extent from QEMU monitor 2010-05-24 15:55:51 -06:00
qemu_monitor_text.c Fix up basic migration. 2010-05-25 10:48:10 -04:00
qemu_monitor_text.h Query block allocation extent from QEMU monitor 2010-05-24 15:55:51 -06:00
qemu_monitor.c Query block allocation extent from QEMU monitor 2010-05-24 15:55:51 -06:00
qemu_monitor.h Query block allocation extent from QEMU monitor 2010-05-24 15:55:51 -06:00
qemu_security_dac.c initialize "meta" in virStorageFileGetMetadata, not in each caller 2010-05-19 17:07:08 +02:00
qemu_security_dac.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu_security_stacked.c Don't reset user/group/security label on shared filesystems during migrate 2010-05-14 09:21:24 -04:00
qemu_security_stacked.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
qemu.conf qemu: Allow using regular audio backends with VNC 2010-05-25 10:49:29 -04:00
test_libvirtd_qemu.aug qemu: Allow using regular audio backends with VNC 2010-05-25 10:49:29 -04:00
THREADS.txt Release driver and domain lock when running monitor commands 2009-11-10 13:27:18 +00:00