[CRIU] [PATCH 1/2] ipc: save local user and group id-s for ipc objects

Andrey Vagin avagin at openvz.org
Fri Oct 23 07:51:57 PDT 2015


From: Andrew Vagin <avagin at openvz.org>

5468  semctl(0, 1, IPC_SET, 0x7ffd25bcb590) = -1 EINVAL (Invalid argument)

Reported-by: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 ipc_ns.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ipc_ns.c b/ipc_ns.c
index fddd1c7..737b1c6 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -47,10 +47,10 @@ static void fill_ipc_desc(int id, IpcDescEntry *desc, const struct ipc_perm *ipc
 {
 	desc->id = id;
 	desc->key = ipcp->KEY;
-	desc->uid = ipcp->uid;
-	desc->gid = ipcp->gid;
-	desc->cuid = ipcp->cuid;
-	desc->cgid = ipcp->cgid;
+	desc->uid = userns_uid(ipcp->uid);
+	desc->gid = userns_gid(ipcp->gid);
+	desc->cuid = userns_uid(ipcp->cuid);
+	desc->cgid = userns_gid(ipcp->cgid);
 	desc->mode = ipcp->mode;
 }
 
-- 
2.4.3



More information about the CRIU mailing list