From: Osier Yang Date: Mon, 6 May 2013 12:45:12 +0000 (+0800) Subject: util: Fix regression introduced by commit 4360a098441 X-Git-Tag: CVE-2013-1962~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e106c0112a3a5d06fcea74b0d1d130c720c1c829;p=thirdparty%2Flibvirt.git util: Fix regression introduced by commit 4360a098441 Which refactored the old code, and introduced new helper virIsCapableVport, but the path for checking with access() is not correctly constructed. --- diff --git a/src/util/virutil.c b/src/util/virutil.c index 39eeefb99e..5412eb5ebb 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1734,7 +1734,7 @@ virIsCapableVport(const char *sysfs_prefix, int ret = -1; if (virAsprintf(&fc_host_path, - "%shost%d%s", + "%shost%d/%s", sysfs_prefix ? sysfs_prefix : SYSFS_FC_HOST_PATH, host, "vport_create") < 0) { @@ -1743,7 +1743,7 @@ virIsCapableVport(const char *sysfs_prefix, } if (virAsprintf(&scsi_host_path, - "%shost%d%s", + "%shost%d/%s", sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_HOST_PATH, host, "vport_create") < 0) {