[PATCH] sk-unix.c: Don't mangle name provided by fiag message

Cyrill Gorcunov gorcunov at openvz.org
Thu Aug 30 13:43:34 UTC 2012


Otherwise we can't fetch stat.

Reported-by: "Muralidhar, Rajeev D" <rajeev.d.muralidhar at intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 sk-unix.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sk-unix.c b/sk-unix.c
index 9a9323c..605e32b 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -277,7 +277,7 @@ static int unix_collect_one(const struct unix_diag_msg *m,
 			}
 
 			uv = RTA_DATA(tb[UNIX_DIAG_VFS]);
-			snprintf(rpath, sizeof(rpath), ".%s", name);
+			snprintf(rpath, sizeof(rpath), "%s", name);
 			if (fstatat(mntns_root, rpath, &st, 0)) {
 				pr_perror("Can't stat socket %d(%s)",
 						m->udiag_ino, rpath);
-- 
1.7.7.6


--opJtzjQTFsWo+cga--


More information about the Containers mailing list