[CRIU] [PATCH 5/6] util: extend check_uid() to check criu user
Ruslan Kuprieiev
kupruser at gmail.com
Tue Oct 1 11:08:50 PDT 2013
If real UID != task UID, don't dump/restore task.
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
-------------- next part --------------
---
diff --git a/util.c b/util.c
index e8d1d92..2927e97 100644
--- a/util.c
+++ b/util.c
@@ -610,5 +610,11 @@ int check_uid(uid)
return -1;
}
+ if (opts.uid != uid && opts.uid != 0) {
+ pr_err("UID(%d) != user's UID(%d)\n",
+ uid, opts.uid);
+ return -1;
+ }
+
return 0;
}
More information about the CRIU
mailing list