[2/5] check: don't close file descriptors in check_user_ns

Submitted by Andrey Vagin on Sept. 12, 2018, 11:41 p.m.

Details

Message ID 20180912234115.20736-3-avagin@virtuozzo.com
State Accepted
Series "criu: remove all magic of service-fd when it isn't required"
Headers show

Commit Message

Andrey Vagin Sept. 12, 2018, 11:41 p.m.
Do someone remember why we are doing this?

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 criu/namespaces.c | 5 -----
 1 file changed, 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/namespaces.c b/criu/namespaces.c
index 24cd61e2b..96cc2f0e5 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -857,7 +857,6 @@  static int check_user_ns(int pid)
 		struct __user_cap_header_struct hdr;
 		uid_t uid;
 		gid_t gid;
-		int i;
 
 		uid = host_uid(0);
 		gid = host_gid(0);
@@ -900,10 +899,6 @@  static int check_user_ns(int pid)
 			return -1;
 		}
 
-		close_old_fds();
-		for (i = SERVICE_FD_MIN + 1; i < SERVICE_FD_MAX; i++)
-			close_service_fd(i);
-
 		/*
 		 * Check that we are able to enter into other namespaces
 		 * from the target userns namespace. This signs that these