fix mis-use of PF_UNIX as a protocol

This commit is contained in:
John Levon 2009-01-28 14:36:23 +00:00
parent be33b189a5
commit 499189694a
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Wed Jan 28 14:24:45 GMT 2009 John Levon <john.levon@sun.com>
* src/xend_internal.c: fix mis-use of PF_UNIX as a protocol
Wed Jan 28 14:27:11 +0100 2009 Jim Meyering <meyering@redhat.com>
libvirt_proxy: avoid potential buffer overflow

View File

@ -752,7 +752,11 @@ xenDaemonOpen_unix(virConnectPtr conn, const char *path)
memset(&priv->addr, 0, sizeof(priv->addr));
priv->addrfamily = AF_UNIX;
priv->addrprotocol = PF_UNIX;
/*
* This must be zero on Solaris at least for AF_UNIX (which should
* really be PF_UNIX, but doesn't matter).
*/
priv->addrprotocol = 0;
priv->addrlen = sizeof(struct sockaddr_un);
addr = (struct sockaddr_un *)&priv->addr;