Commit da3f0d9a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 4ff68eeb
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment