[18/19] unix: unix_prepare_bindmount -- Allow to connect via relative name

Submitted by Cyrill Gorcunov on Sept. 14, 2018, 2:08 p.m.

Details

Message ID 20180914140842.6462-19-gorcunov@gmail.com
State New
Series "unix: Add support for bindmounted dgram sockets"
Headers show

Commit Message

Cyrill Gorcunov Sept. 14, 2018, 2:08 p.m.
Once socket is bounded we should allow to connect to us
via relative name.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/sk-unix.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index ef087bada886..d24bfe0ff5e5 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -2416,6 +2416,12 @@  int unix_prepare_bindmount(struct mount_info *mi)
 		goto out;
 	}
 
+	/*
+	 * Once we are pre-created and bounded, clear
+	 * the USK_NOCWD flag so other sockets migh connect
+	 * to us via relative name.
+	 */
+	ui->flags &= ~USK_NOCWD;
 	ret = 0;
 out:
 	close_safe(&prev_cwd_fd);