[CRIU] [PATCH 6/6] restore: add check_uid()

Ruslan Kuprieiev kupruser at gmail.com
Tue Oct 1 11:08:58 PDT 2013


Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
-------------- next part --------------
---
diff --git a/cr-restore.c b/cr-restore.c
index b507844..57ad535 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1946,6 +1946,10 @@ static int prepare_creds(int pid, struct task_restore_core_args *args)
 		return -1;
 	}
 
+	ret = check_uid(ce->uid);
+	if (ret < 0)
+		return ret;
+
 	args->creds = *ce;
 	args->creds.cap_inh = args->cap_inh;
 	memcpy(args->cap_inh, ce->cap_inh, sizeof(args->cap_inh));


More information about the CRIU mailing list