diff --git a/criu/sk-queue.c b/criu/sk-queue.c index f38d8972c..ae19bbc20 100644 --- a/criu/sk-queue.c +++ b/criu/sk-queue.c @@ -160,7 +160,9 @@ static int dump_sk_creds(struct ucred *ucred, SkPacketEntry *pe, int flags) int ret; /* Does a process exist? */ - if (pidns) { + if (ucred->pid == 0) { + ret = 0; + } else if (pidns) { snprintf(path, sizeof(path), "%d", ucred->pid); ret = faccessat(get_service_fd(CR_PROC_FD_OFF), path, R_OK, 0); } else { @@ -389,7 +391,7 @@ static int send_one_pkt(int fd, struct sk_packet *pkt) * boundaries messages should be saved. */ - if (entry->ucred) { + if (entry->ucred && entry->ucred->pid) { struct ucred *ucred; struct cmsghdr *ch;