From 2143d7e9cae30aa00a51a19f561a19a5a12828fa Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 30 Jul 2015 22:53:00 +0300 Subject: [PATCH] sk-unix: Fix name resolving on nested mount points In case if socket's cwd lays on nested mount point we might resolve its path a bit incorrectly (mount_resolve_path helper should not obtain paths with leading dot). Thus send a path without leading dot for correct name resolving. Also add some error messages. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- sk-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sk-unix.c b/sk-unix.c index ffcdda004..7a9972864 100644 --- a/sk-unix.c +++ b/sk-unix.c @@ -229,7 +229,7 @@ static int resolve_rel_name(struct unix_sk_desc *sk, const struct fd_parms *p) } if ((st.st_ino == rel_name->udiag_vfs_ino) && - phys_stat_dev_match(st.st_dev, rel_name->udiag_vfs_dev, ns, path)) { + phys_stat_dev_match(st.st_dev, rel_name->udiag_vfs_dev, ns, &path[1])) { rel_name->dir = xstrdup(dir); if (!rel_name->dir) return -ENOMEM;