2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

criu: threads -- Allow uids/gids being different

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@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov
2017-10-02 13:16:18 +03:00
committed by Andrei Vagin
parent 4ff68eeb36
commit da3f0d9a06

View File

@@ -629,23 +629,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"