From: Long Wang Date: Sat, 8 Jul 2017 02:48:15 +0000 (+0800) Subject: lxc_abstract_unix_connect: remove the workaround-code X-Git-Tag: lxc-2.1.0~61^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1685%2Fhead;p=thirdparty%2Flxc.git lxc_abstract_unix_connect: remove the workaround-code commit bdb3f44147bc1a55a97131b4b39d42844ae4fb9e says that we may undo the change in august 2014. I think that it is time to do that. Signed-off-by: Long Wang --- diff --git a/src/lxc/af_unix.c b/src/lxc/af_unix.c index 074fabb44..e6ba81fb8 100644 --- a/src/lxc/af_unix.c +++ b/src/lxc/af_unix.c @@ -123,12 +123,7 @@ int lxc_abstract_unix_connect(const char *path) strncpy(&addr.sun_path[1], &path[1], strlen(&path[1])); if (connect(fd, (struct sockaddr *)&addr, offsetof(struct sockaddr_un, sun_path) + len + 1)) { - int tmp = errno; - /* special case to connect to older containers */ - if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == 0) - return fd; close(fd); - errno = tmp; return -1; }