[CRIU] [PATCH 1/2] criu: threads -- Allow uids/gids being different
Cyrill Gorcunov
gorcunov at openvz.org
Mon Oct 2 13:16:18 MSK 2017
We are carrying uids/gids in per-thread way since v1.8,
so no need to require them to match anymore. We still
require seccomp to match though. Need to revisit, seems
may relax this requirement as well.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/seize.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/criu/seize.c b/criu/seize.c
index 4abc159c2e9c..0a36b721e55d 100644
--- a/criu/seize.c
+++ b/criu/seize.c
@@ -634,23 +634,14 @@ static inline bool thread_collected(struct pstree_item *i, pid_t tid)
static bool creds_dumpable(struct proc_status_creds *parent,
struct proc_status_creds *child)
{
- size_t size;
/*
- * The comparison rules are the following
- *
- * - CAPs can be different
* - seccomp filters should be passed via
* semantic comparison (FIXME) but for
* now we require them to be exactly
* identical
- * - sigpnd may be different
- * - the rest of members must match
*/
-
- size = offsetof(struct proc_status_creds, cap_inh) -
- sizeof(parent->s.sigpnd);
-
- if (memcmp(&parent->s.sigpnd, &child->s.sigpnd, size)) {
+ if (parent->s.seccomp_mode != child->s.seccomp_mode ||
+ parent->last_filter != child->last_filter) {
if (!pr_quelled(LOG_DEBUG)) {
pr_debug("Creds undumpable (parent:child)\n"
" uids: %d:%d %d:%d %d:%d %d:%d\n"
--
2.7.5
More information about the CRIU
mailing list