From: Guido Günther Date: Wed, 2 Nov 2011 20:39:31 +0000 (+0100) Subject: Use ENAMETOOLONG if the the socket path is longer than UNIX_PATH_MAX X-Git-Tag: v0.9.7~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bab30d0713e212be3ee26dc71ad157d45811114;p=thirdparty%2Flibvirt.git Use ENAMETOOLONG if the the socket path is longer than UNIX_PATH_MAX --- diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index ab88e19fd9..d832c53fd6 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -327,7 +327,8 @@ int virNetSocketNewListenUNIX(const char *path, addr.data.un.sun_family = AF_UNIX; if (virStrcpyStatic(addr.data.un.sun_path, path) == NULL) { - virReportSystemError(ENOMEM, _("Path %s too long for unix socket"), path); + virReportSystemError(ENAMETOOLONG, + _("Path %s too long for unix socket"), path); goto error; } if (addr.data.un.sun_path[0] == '@')