VirtFS update:
* Fix for virtfs-proxy-helper crash * Gracefully handle the error condition on input validation in virtfs-proxy-helper -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVgD74AAoJEN5BpP4ExOI6TRgP/iIqwdimXCBlR2tbU1tr7WMp uThQ77HQ0C1zfn6Zkl1Kq7+U6XtVnYedY/EeXpDQEnT2wxl5s7yKca01VUrcAwEM W1/WDRYauqoRVcJW0IzJHgCb/fGvdroJSX+YY3+ITgVtbE3yfPsGEBYKG8oW4znF xzkO1yemzd2qmBKruILyQrKYlByFZdxjtvuRGQcfXIm9JJ68Rb6H73BbwDW5Rdy2 IzYqisnjgjF/6t3KYSURc19+vyJIQTeZZdCkG9yJCxo1OrfiEVmeePfcxPv08BBs 3/bNYAoQHs+S1Fb3fLOSEulex7oqmDJ/exLfaUrnWIwErcWPgWEz2xlxD1rs8Hq5 fY4As02r9t0aJTFc5kbWxYEpFeQ4fVbN1zNRKPMPnpi0bjPy5m2czp2XYB4J6Toc iaTFFvycZPhI533/0Is6joO8uDLfREWgsxCnYOIS3YIcliiHKn4H616PoiHrmKZP QzmQ7Dd43QgDAo0mhZXz32itHALPodKv1v7RsDvzlUkXqZEr2RFjrOmlzYKwqMrT PLXaWRsgV6sOXEOWN15AJYBzAkXW6mvBLCjRIcxEbgK90Z9dbNMK4cvHeAS2vatZ tdjC6nxj3upzK83aI9yy59AramuQHS/z+NDPaD55j1oosQJwJ9PBuNUHeyJuwZzp oNcqDzt9GLnKxGCUtTzU =S8oz -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' into staging VirtFS update: * Fix for virtfs-proxy-helper crash * Gracefully handle the error condition on input validation in virtfs-proxy-helper # gpg: Signature made Tue Jun 16 16:21:28 2015 BST using RSA key ID 04C4E23A # gpg: Good signature from "Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 4846 9DE7 1860 360F A6E9 968C DE41 A4FE 04C4 E23A * remotes/kvaneesh/tags/for-upstream-signed: virtfs-proxy-helper: fail gracefully if socket path is too long virtfs-proxy-helper: add missing long option terminator Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
8c29f8d6b9
@ -49,6 +49,7 @@ static struct option helper_opts[] = {
|
||||
{"socket", required_argument, NULL, 's'},
|
||||
{"uid", required_argument, NULL, 'u'},
|
||||
{"gid", required_argument, NULL, 'g'},
|
||||
{},
|
||||
};
|
||||
|
||||
static bool is_daemon;
|
||||
@ -738,7 +739,12 @@ static int proxy_socket(const char *path, uid_t uid, gid_t gid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
g_assert(strlen(path) < sizeof(proxy.sun_path));
|
||||
if (strlen(path) >= sizeof(proxy.sun_path)) {
|
||||
do_log(LOG_CRIT, "UNIX domain socket path exceeds %zu characters\n",
|
||||
sizeof(proxy.sun_path));
|
||||
return -1;
|
||||
}
|
||||
|
||||
sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (sock < 0) {
|
||||
do_perror("socket");
|
||||
|
Loading…
Reference in New Issue
Block a user